Home
last modified time | relevance | path

Searched refs:subStr (Results 1 – 25 of 50) sorted by relevance

12

/ohos5.0/commonlibrary/c_utils/base/src/
H A Dfile_ex.cpp97 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 Dfile_ex.cpp280 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 Ddevmgr_uevent.c109 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 Dohos_resource_adapter_impl.cpp95 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 Dfile_ex.h48 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 Dstring_util.cpp100 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 Dparams_parser.c205 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 Ddefault_logger.cpp22 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 Dfile_ex.rs51 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 Djs_interactable_view.cpp434 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 Dplugin_element.cpp432 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 Dtool_system_test.cpp70 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 Dbundle_util.h42 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 Dts-universal-styled-string-sys.md121 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 Dtool_system_test.cpp84 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 Dbundle_util.cpp152 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 Dfreeze_json_util.cpp73 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 Dscript_basicinstruction.cpp111 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 Dc-utils-guide-file.md19 | 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 Dc_utils_guide_rust_file.md18 | 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 DNetStackCommonUtilsTest.cpp46 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 Dplugin_pattern.cpp355 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 Dmedia_file_utils.cpp264 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 Dringtone_file_utils.cpp223 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 Ddate_time_rule.cpp271 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()

12