/ohos5.0/commonlibrary/c_utils/base/src/ |
H A D | file_ex.cpp | 97 std::string tmpStr(subStr); in RustStringExistsInFile() 104 std::string tmpStr(subStr); in RustCountStrInFile() 359 if (subStr.empty()) { in StringExistsInFile() 375 string sublower(subStr); in StringExistsInFile() 377 transform(subStr.begin(), subStr.end(), sublower.begin(), ::tolower); in StringExistsInFile() 383 if (subStr.empty()) { in CountStrInStr() 390 size_t length = subStr.length(); in CountStrInStr() 401 if (subStr.empty()) { in CountStrInFile() 414 return CountStrInStr(str, subStr); in CountStrInFile() 418 string sublower(subStr); in CountStrInFile() [all …]
|
/ohos5.0/foundation/ai/intelligent_voice_framework/llt/hdt/depend_libs/src/ |
H A D | file_ex.cpp | 280 if (subStr.empty()) { in StringExistsInFile() 292 return (str.find(subStr) != string::npos); in StringExistsInFile() 296 string sublower(subStr); in StringExistsInFile() 298 transform(subStr.begin(), subStr.end(), sublower.begin(), ::tolower); in StringExistsInFile() 302 int CountStrInStr(const string& str, const string& subStr) in CountStrInStr() argument 304 if (subStr.empty()) { in CountStrInStr() 311 size_t length = subStr.length(); in CountStrInStr() 322 if (subStr.empty()) { in CountStrInFile() 335 return CountStrInStr(str, subStr); in CountStrInFile() 339 string sublower(subStr); in CountStrInFile() [all …]
|
/ohos5.0/drivers/hdf_core/adapter/uhdf2/manager/src/ |
H A D | devmgr_uevent.c | 109 static void DevMgrUeventReplaceLineFeed(char *str, const char *subStr, char c) in DevMgrUeventReplaceLineFeed() argument 113 while ((ptr = strstr(str, subStr)) != NULL) { in DevMgrUeventReplaceLineFeed() 174 if (subStr == NULL || strlen(subStr) == 0) { in DevMgrUeventParseMatchKey() 175 HDF_LOGE("match key invalid [%{public}s]", subStr); in DevMgrUeventParseMatchKey() 202 …if (strncmp(subStr, PNP_EVENT_STR, strlen(PNP_EVENT_STR)) != 0 || strlen(subStr) < strlen(PNP_EVEN… in DevMgrUeventParseHdfEvent() 203 HDF_LOGE("parse hdf event %{public}s failed", subStr); in DevMgrUeventParseHdfEvent() 207 char *event = subStr + strlen(PNP_EVENT_STR); in DevMgrUeventParseHdfEvent() 210 HDF_LOGE("parse event %{public}s fail, no action", subStr); in DevMgrUeventParseHdfEvent() 274 char *subStr = line; in DevMgrUeventParseRule() local 283 subStr = ptr; in DevMgrUeventParseRule() [all …]
|
/ohos5.0/base/web/webview/ohos_adapter/ohos_resource_adapter/src/ |
H A D | ohos_resource_adapter_impl.cpp | 95 std::string subStr = rawFile.substr(RAWFILE_PREFIX.size()); in ParseRawFile() local 96 if (subStr.substr(0, BUNDLE_NAME_PREFIX.size()) != BUNDLE_NAME_PREFIX) { in ParseRawFile() 99 subStr = subStr.substr(BUNDLE_NAME_PREFIX.size()); in ParseRawFile() 100 size_t pos = subStr.find('/'); in ParseRawFile() 105 bundleName = subStr.substr(0, pos); in ParseRawFile() 107 subStr = subStr.substr(pos + 1); in ParseRawFile() 108 if (subStr.substr(0, MODULE_NAME_PREFIX.size()) != MODULE_NAME_PREFIX) { in ParseRawFile() 111 subStr = subStr.substr(MODULE_NAME_PREFIX.size()); in ParseRawFile() 112 pos = subStr.find('/'); in ParseRawFile() 117 moduleName = subStr.substr(0, pos); in ParseRawFile() [all …]
|
/ohos5.0/commonlibrary/c_utils/base/include/ |
H A D | file_ex.h | 48 bool RustStringExistsInFile(const rust::String& fileName, const rust::String& subStr, bool caseSens… 49 int RustCountStrInFile(const rust::String& fileName, const rust::String& subStr, bool caseSensitiv… 142 bool StringExistsInFile(const std::string& fileName, const std::string& subStr, bool caseSensitive … 154 int CountStrInFile(const std::string& fileName, const std::string& subStr, bool caseSensitive = tr…
|
/ohos5.0/foundation/ai/intelligent_voice_framework/utils/ |
H A D | string_util.cpp | 100 uint32_t StringUtil::CalSubStrNum(const string &str, const string &subStr) in CalSubStrNum() argument 102 if (subStr.size() == 0) { in CalSubStrNum() 107 pos = str.find(subStr, pos); in CalSubStrNum() 110 pos = pos + subStr.size(); in CalSubStrNum() 111 pos = str.find(subStr, pos); in CalSubStrNum()
|
/ohos5.0/base/security/crypto_framework/common/src/ |
H A D | params_parser.c | 205 HcString subStr = CreateString(); in ParseAndSetParameter() local 207 DeleteString(&subStr); in ParseAndSetParameter() 216 if (!StringSubString(&str, pos, findPos - pos, &subStr)) { in ParseAndSetParameter() 220 ret = (*setFunc)(FindConfig(&subStr), params); in ParseAndSetParameter() 230 if (!StringSubString(&str, pos, strLen - pos, &subStr)) { in ParseAndSetParameter() 234 ret = (*setFunc)(FindConfig(&subStr), params); in ParseAndSetParameter() 239 DeleteString(&subStr); in ParseAndSetParameter()
|
/ohos5.0/base/hiviewdfx/hiview/base/ |
H A 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()
|
/ohos5.0/commonlibrary/c_utils/base/src/rust/ |
H A D | file_ex.rs | 51 subStr: &String, in RustStringExistsInFile() 56 pub fn RustCountStrInFile(fileName: &String, subStr: &String, caseSensitive: bool) -> i32; in RustCountStrInFile()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/ |
H A D | js_interactable_view.cpp | 434 std::string subStr; in SplitString() local 437 if (!subStr.empty()) { in SplitString() 438 strList.push_back(subStr); in SplitString() 439 subStr.clear(); in SplitString() 442 subStr.push_back(str[i]); in SplitString() 445 if (!subStr.empty()) { in SplitString() 446 strList.push_back(subStr); in SplitString()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/plugin/ |
H A D | plugin_element.cpp | 432 std::string subStr; in SplitString() local 435 if (!subStr.empty()) { in SplitString() 436 strList.push_back(subStr); in SplitString() 437 subStr.clear(); in SplitString() 440 subStr.push_back(str[i]); in SplitString() 443 if (!subStr.empty()) { in SplitString() 444 strList.push_back(subStr); in SplitString()
|
/ohos5.0/foundation/bundlemanager/bundle_tool/test/systemtest/bm/ |
H A D | tool_system_test.cpp | 70 bool ToolSystemTest::IsSubSequence(const std::string& str, const std::string& subStr) in IsSubSequence() argument 72 return str.find(subStr) != std::string::npos; in IsSubSequence()
|
/ohos5.0/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/include/ |
H A D | bundle_util.h | 42 static bool EndWith(const char *str, const char *subStr); 43 static bool StartWith(const char *str, const char *subStr);
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ |
H A D | ts-universal-styled-string-sys.md | 121 let subStr = styles.subStyledString(0, 2) 122 console.info("Debug: subStr = " + subStr.getString())
|
/ohos5.0/foundation/ability/ability_runtime/tools/test/systemtest/aa/ |
H A D | tool_system_test.cpp | 84 bool ToolSystemTest::IsSubSequence(const std::string& str, const std::string& subStr) in IsSubSequence() argument 86 return str.find(subStr) != std::string::npos; in IsSubSequence()
|
/ohos5.0/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/src/ |
H A D | bundle_util.cpp | 152 bool BundleUtil::EndWith(const char *str, const char *subStr) in EndWith() argument 154 if (str == nullptr || subStr == nullptr) { in EndWith() 159 int32_t subStrLen = strlen(subStr); in EndWith() 165 if (str[strLen - 1] != subStr[subStrLen - 1]) { in EndWith() 174 bool BundleUtil::StartWith(const char *str, const char *subStr) in StartWith() argument 176 if (str == nullptr || subStr == nullptr) { in StartWith() 181 int32_t subStrLen = strlen(subStr); in StartWith() 188 if (str[index] != subStr[index]) { in StartWith()
|
/ohos5.0/base/hiviewdfx/hiview/base/utility/ |
H A D | freeze_json_util.cpp | 73 int CountSubStr(const std::string& str, const std::string& subStr) in CountSubStr() argument 77 while ((pos = str.find(subStr, pos)) < str.size()) { in CountSubStr() 79 pos += subStr.size(); in CountSubStr()
|
/ohos5.0/base/update/updater/services/script/script_instruction/ |
H A D | script_basicinstruction.cpp | 111 std::string subStr; in Execute() local 117 ret = context.GetParam(1, subStr); in Execute() 122 string::size_type last = str.find(subStr); in Execute()
|
/ohos5.0/commonlibrary/c_utils/docs/zh-cn/ |
H A D | c-utils-guide-file.md | 19 | int | **CountStrInFile**(const std::string& fileName, const std::string& subStr, bool caseSensiti… 27 | bool | **StringExistsInFile**(const std::string& fileName, const std::string& subStr, bool caseSe…
|
H A D | c_utils_guide_rust_file.md | 18 | i32 | **RustCountStrInFile**(fileName: &String, subStr: &String, caseSensitive: bool)<br>查看指定文件中出… 26 | bool | **RustStringExistsInFile**(fileName: &String, subStr: &String, caseSensitive: bool)<br>检查指…
|
/ohos5.0/foundation/communication/netstack/test/unittest/utils/common_utils/ |
H A D | NetStackCommonUtilsTest.cpp | 46 std::vector<std::string> subStr = Split(str, STATUS_LINE_COMMA); variable 47 EXPECT_STREQ(subStr[0].data(), "The"); 48 EXPECT_STREQ(subStr[1].data(), "weather"); 49 EXPECT_STREQ(subStr[2].data(), "is"); 50 EXPECT_STREQ(subStr[3].data(), "fine"); 51 EXPECT_STREQ(subStr[4].data(), "today"); 52 EXPECT_EQ(subStr.size(), 5); 58 std::string subStr = Strip(str, SPACE); variable 59 EXPECT_STREQ(subStr.data(), "The weather is fine today");
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/plugin/ |
H A D | plugin_pattern.cpp | 355 std::string subStr; in SplitString() local 358 if (!subStr.empty()) { in SplitString() 359 strList.push_back(subStr); in SplitString() 360 subStr.clear(); in SplitString() 363 subStr.push_back(str[i]); in SplitString() 366 if (!subStr.empty()) { in SplitString() 367 strList.push_back(subStr); in SplitString()
|
/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/media_library_helper/src/ |
H A D | media_file_utils.cpp | 264 bool MediaFileUtils::Mkdir(const string &subStr, shared_ptr<int> errCodePtr) in Mkdir() argument 267 if (mkdir(subStr.c_str(), CHOWN_RWX_USR_GRP) == -1) { in Mkdir() 272 …OG("Failed to create directory %{public}d, path:%{public}s", err, DesensitizePath(subStr).c_str()); in Mkdir() 274 PrintStatInformation(GetParentPath(subStr)); in Mkdir() 285 string subStr; in CreateDirectory() local 299 subStr.append(SLASH_CHAR + segment); in CreateDirectory() 300 if (!IsDirectory(subStr, errCodePtr)) { in CreateDirectory() 301 if (!Mkdir(subStr, errCodePtr)) { in CreateDirectory()
|
/ohos5.0/foundation/multimedia/ringtone_library/services/utils/src/ |
H A D | ringtone_file_utils.cpp | 223 bool RingtoneFileUtils::Mkdir(const string &subStr, shared_ptr<int> errCodePtr) in Mkdir() argument 226 if (mkdir(subStr.c_str(), MODE_RWX_USR_GRP) == -1) { in Mkdir() 256 string subStr; in CreateDirectory() local 265 subStr.append(RINGTONE_SLASH_CHAR + segment); in CreateDirectory() 266 if (!IsDirectory(subStr, errCodePtr)) { in CreateDirectory() 267 if (!Mkdir(subStr, errCodePtr)) { in CreateDirectory()
|
/ohos5.0/base/global/i18n/frameworks/intl/entity_recognition/date_time_recognition/src/ |
H A D | date_time_rule.cpp | 271 std::string subStr; in CompareBeginEnd() local 273 subStr = src.substr(0, lengthTarget); in CompareBeginEnd() 275 subStr = src.substr(lengthSrc - lengthTarget, lengthTarget); in CompareBeginEnd() 277 return subStr == target; in CompareBeginEnd()
|