diff --git a/include/etl/private/string_utilities_helper.h b/include/etl/private/string_utilities_helper.h index 67a980c2..72fcb2f8 100644 --- a/include/etl/private/string_utilities_helper.h +++ b/include/etl/private/string_utilities_helper.h @@ -273,12 +273,12 @@ namespace etl } //*************************************************************************** - /// transform_characters + /// replace_characters //*************************************************************************** template - void transform_characters(TIString& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + void replace_characters(TIString& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { while (pairsbegin != pairsend) { @@ -288,12 +288,12 @@ namespace etl } //*************************************************************************** - /// transform_strings + /// replace_strings //*************************************************************************** template - void transform_strings(TIString& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + void replace_strings(TIString& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { while (pairsbegin != pairsend) { diff --git a/include/etl/string_utilities.h b/include/etl/string_utilities.h index 33a71a55..4a6e3beb 100644 --- a/include/etl/string_utilities.h +++ b/include/etl/string_utilities.h @@ -317,23 +317,23 @@ namespace etl } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::istring& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::istring& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_characters(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_characters(s, pairsbegin, pairsend); } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::istring& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::istring& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_strings(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_strings(s, pairsbegin, pairsend); } //*************************************************************************** diff --git a/include/etl/u16string_utilities.h b/include/etl/u16string_utilities.h index 1fa4e8c7..8f6a6818 100644 --- a/include/etl/u16string_utilities.h +++ b/include/etl/u16string_utilities.h @@ -273,23 +273,23 @@ namespace etl } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::iu16string& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::iu16string& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_characters(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_characters(s, pairsbegin, pairsend); } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::iu16string& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::iu16string& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_strings(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_strings(s, pairsbegin, pairsend); } //*************************************************************************** diff --git a/include/etl/u32string_utilities.h b/include/etl/u32string_utilities.h index 7a329230..f2bc9bbf 100644 --- a/include/etl/u32string_utilities.h +++ b/include/etl/u32string_utilities.h @@ -273,23 +273,23 @@ namespace etl } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::iu32string& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::iu32string& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_characters(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_characters(s, pairsbegin, pairsend); } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::iu32string& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::iu32string& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_strings(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_strings(s, pairsbegin, pairsend); } //*************************************************************************** diff --git a/include/etl/wstring_utilities.h b/include/etl/wstring_utilities.h index 02cffe7b..d5df81f0 100644 --- a/include/etl/wstring_utilities.h +++ b/include/etl/wstring_utilities.h @@ -273,23 +273,23 @@ namespace etl } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::iwstring& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::iwstring& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_characters(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_characters(s, pairsbegin, pairsend); } //*************************************************************************** - /// transform + /// replace //*************************************************************************** - inline void transform(etl::iwstring& s, - const etl::pair* pairsbegin, - const etl::pair* pairsend) + inline void replace(etl::iwstring& s, + const etl::pair* pairsbegin, + const etl::pair* pairsend) { - etl::private_string_utilities::transform_strings(s, pairsbegin, pairsend); + etl::private_string_utilities::replace_strings(s, pairsbegin, pairsend); } //*************************************************************************** diff --git a/test/test_string_utilities.cpp b/test/test_string_utilities.cpp index 041fdbb7..794bd644 100644 --- a/test/test_string_utilities.cpp +++ b/test/test_string_utilities.cpp @@ -785,7 +785,7 @@ namespace } //************************************************************************* - TEST(test_transform_characters) + TEST(test_replace_characters) { String text(STR("This+++is a *file//name:")); String expected(STR("This---is_a__-file__name_")); @@ -799,13 +799,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_characters_empty_string) + TEST(test_replace_characters_empty_string) { String text(STR("")); String expected(STR("")); @@ -819,13 +819,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings) + TEST(test_replace_strings) { String text(STR("This+++is a *file//name:")); String expected(STR("Thisxyis%20a%20%20-file_name.txt")); @@ -839,13 +839,13 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings_empty_strings) + TEST(test_replace_strings_empty_strings) { String text(STR("")); String expected(STR("")); @@ -859,7 +859,7 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } diff --git a/test/test_string_utilities_u16.cpp b/test/test_string_utilities_u16.cpp index 96fc6f0c..e9c4237e 100644 --- a/test/test_string_utilities_u16.cpp +++ b/test/test_string_utilities_u16.cpp @@ -785,7 +785,7 @@ namespace } //************************************************************************* - TEST(test_transform_characters) + TEST(test_replace_characters) { String text(STR("This+++is a *file//name:")); String expected(STR("This---is_a__-file__name_")); @@ -799,13 +799,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_characters_empty_string) + TEST(test_replace_characters_empty_string) { String text(STR("")); String expected(STR("")); @@ -819,13 +819,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings) + TEST(test_replace_strings) { String text(STR("This+++is a *file//name:")); String expected(STR("Thisxyis%20a%20%20-file_name.txt")); @@ -839,13 +839,13 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings_empty_strings) + TEST(test_replace_strings_empty_strings) { String text(STR("")); String expected(STR("")); @@ -859,7 +859,7 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } diff --git a/test/test_string_utilities_u32.cpp b/test/test_string_utilities_u32.cpp index dec24c16..f38f64c1 100644 --- a/test/test_string_utilities_u32.cpp +++ b/test/test_string_utilities_u32.cpp @@ -785,7 +785,7 @@ namespace } //************************************************************************* - TEST(test_transform_characters) + TEST(test_replace_characters) { String text(STR("This+++is a *file//name:")); String expected(STR("This---is_a__-file__name_")); @@ -799,13 +799,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_characters_empty_string) + TEST(test_replace_characters_empty_string) { String text(STR("")); String expected(STR("")); @@ -819,13 +819,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings) + TEST(test_replace_strings) { String text(STR("This+++is a *file//name:")); String expected(STR("Thisxyis%20a%20%20-file_name.txt")); @@ -839,13 +839,13 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings_empty_strings) + TEST(test_replace_strings_empty_strings) { String text(STR("")); String expected(STR("")); @@ -859,7 +859,7 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } diff --git a/test/test_string_utilities_wchar_t.cpp b/test/test_string_utilities_wchar_t.cpp index 12e505d3..188e5222 100644 --- a/test/test_string_utilities_wchar_t.cpp +++ b/test/test_string_utilities_wchar_t.cpp @@ -785,7 +785,7 @@ namespace } //************************************************************************* - TEST(test_transform_characters) + TEST(test_replace_characters) { String text(STR("This+++is a *file//name:")); String expected(STR("This---is_a__-file__name_")); @@ -799,13 +799,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_characters_empty_string) + TEST(test_replace_characters_empty_string) { String text(STR("")); String expected(STR("")); @@ -819,13 +819,13 @@ namespace { STR(':'), STR('_') } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings) + TEST(test_replace_strings) { String text(STR("This+++is a *file//name:")); String expected(STR("Thisxyis%20a%20%20-file_name.txt")); @@ -839,13 +839,13 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); } //************************************************************************* - TEST(test_transform_strings_empty_strings) + TEST(test_replace_strings_empty_strings) { String text(STR("")); String expected(STR("")); @@ -859,7 +859,7 @@ namespace { STR(":"), STR(".txt") } }; - etl::transform(text, etl::begin(lookup), etl::end(lookup)); + etl::replace(text, etl::begin(lookup), etl::end(lookup)); CHECK(expected == text); }