Searched refs:sourceStr (Results 1 – 3 of 3) sorted by relevance
/base/update/updateservice/services/core/ability/utils/test/unittest/ |
D | string_utils_test.cpp | 40 std::string sourceStr = " testStr"; variable 41 StringUtils::LTrim(sourceStr); 42 EXPECT_EQ("testStr", sourceStr); 53 std::string sourceStr = "testStr "; variable 54 StringUtils::LTrim(sourceStr); 55 EXPECT_EQ("testStr ", sourceStr); 66 std::string sourceStr = "testStr "; variable 67 StringUtils::RTrim(sourceStr); 68 EXPECT_EQ("testStr", sourceStr); 79 std::string sourceStr = " testStr"; variable [all …]
|
/base/hiviewdfx/hiview/base/ |
D | default_logger.cpp | 22 inline void StringReplace(std::string& sourceStr, const std::string& subStr, const std::string& new… in StringReplace() argument 25 while ((pos = sourceStr.find(subStr)) != std::string::npos) { in StringReplace() 26 sourceStr.replace(pos, subStr.length(), newStr); in StringReplace()
|
/base/update/updateservice/services/core/ability/utils/include/ |
D | string_utils.h | 69 static std::string SafeSubString(const std::string &sourceStr, int beginIndex, int endIndex, in SafeSubString() argument 72 if (sourceStr.empty()) { in SafeSubString() 75 … if (beginIndex < 0 || static_cast<size_t>(endIndex) > sourceStr.size() || beginIndex > endIndex) { in SafeSubString() 78 return sourceStr.substr(beginIndex, endIndex); in SafeSubString()
|