/foundation/multimedia/image_effect/frameworks/native/utils/common/ |
H A D | string_helper.cpp | 23 bool StringHelp::EndsWith(const std::string &input, const std::string &suffix) in EndsWith() argument 25 if (input.length() < suffix.length()) { in EndsWith() 28 return input.compare(input.length() - suffix.length(), suffix.length(), suffix) == 0; in EndsWith() 31 bool StringHelp::EndsWithIgnoreCase(const std::string &input, const std::string &suffix) in EndsWithIgnoreCase() argument 33 if (input.length() < suffix.length()) { in EndsWithIgnoreCase() 37 std::string inputEnd = input.substr(input.length() - suffix.length(), suffix.length()); in EndsWithIgnoreCase() 40 std::string suffixLower = suffix; in EndsWithIgnoreCase() [all...] |
H A D | string_helper.h | 27 IMAGE_EFFECT_EXPORT static bool EndsWith(const std::string &input, const std::string &suffix); 28 IMAGE_EFFECT_EXPORT static bool EndsWithIgnoreCase(const std::string &input, const std::string &suffix);
|
/foundation/arkui/ui_lite/interfaces/kits/common/ |
H A D | image.h | 179 bool IsImgValid(const char* suffix) in IsImgValid() argument 181 return (!strcmp(suffix, ".png") || !strcmp(suffix, ".PNG") || !strcmp(suffix, ".jpg") || in IsImgValid() 182 !strcmp(suffix, ".JPG") || !strcmp(suffix, ".jpeg") || !strcmp(suffix, ".JPEG") || in IsImgValid() 183 !strcmp(suffix, ".BMP") || !strcmp(suffix, ".bmp") || !strcmp(suffix, " in IsImgValid() [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/common/manifest/ |
H A D | manifest_router.cpp | 22 std::string ManifestRouter::GetEntry(const std::string& suffix) const in GetEntry() 27 return pages_.front() + suffix; in GetEntry() 32 const std::string suffix = ".js"; in GetPagePath() local 42 return pages_.front() + suffix; in GetPagePath() 45 return uri + suffix; in GetPagePath() 51 std::string ManifestRouter::GetPagePath(const std::string& uri, const std::string& suffix) const in GetPagePath() 59 return pages_.front() + suffix; in GetPagePath() 63 return uri + suffix; in GetPagePath() 66 if (uri.rfind(suffix) != std::string::npos) { in GetPagePath()
|
H A D | manifest_router.h | 39 std::string GetPagePath(const std::string& uri, const std::string& suffix = ".js") const; 40 std::string GetEntry(const std::string& suffix = ".js") const;
|
/foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/src/ |
H A D | mime_type_mgr.cpp | 75 bool MimeTypeMgr::GetUriSuffix(const std::string &uri, std::string &suffix) in GetUriSuffix() argument 78 suffix = ZIP_SUFFIX; in GetUriSuffix() 82 suffix = FILE_7Z_SUFFIX; in GetUriSuffix() 87 APP_LOGD("Get suffix failed %{private}s", uri.c_str()); in GetUriSuffix() 90 suffix = uri.substr(suffixIndex); in GetUriSuffix() 91 std::transform(suffix.begin(), suffix.end(), suffix.begin(), in GetUriSuffix() 99 std::string suffix; in GetUtdVectorByUri() local 100 if (!GetUriSuffix(uri, suffix)) { in GetUtdVectorByUri() [all...] |
/foundation/multimedia/media_library/frameworks/services/media_cloud_enhancement/include/utils/ |
H A D | dynamic_loader.h | 38 inline bool EndsWith(const std::string& str, const std::string& suffix)
in EndsWith() argument 40 if (str.length() >= suffix.length()) {
in EndsWith() 41 return str.compare(str.length() - suffix.length(), suffix.length(), suffix) == 0;
in EndsWith()
|
/foundation/ability/ability_runtime/frameworks/native/runtime/ |
H A D | js_module_reader.cpp | 91 std::string suffix = std::string(SHARED_FILE_SUFFIX); in GetFormAppHspPath() local 99 realHapPath.length() < suffix.length() || in GetFormAppHspPath() 100 realHapPath.compare(realHapPath.length() - suffix.length(), suffix.length(), suffix) != 0) { in GetFormAppHspPath() 114 std::string suffix = std::string(SHARED_FILE_SUFFIX); in GetCommonAppHspPath() local 117 realHapPath = std::string(ABS_CODE_PATH) + inputPath + suffix; in GetCommonAppHspPath() 122 realHapPath.length() < suffix.length() || in GetCommonAppHspPath() 123 realHapPath.compare(realHapPath.length() - suffix.length(), suffix in GetCommonAppHspPath() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components/theme/ |
H A D | shadow_theme.cpp | 70 const std::string suffix = isDark ? "_dark" : ""; in ParseShadowParam() local 74 auto elevationName = prefix + std::string(attrs[0]) + suffix; in ParseShadowParam() 77 auto offsetXName = prefix + std::string(attrs[1]) + suffix; in ParseShadowParam() 79 auto offsetYName = prefix + std::string(attrs[2]) + suffix; in ParseShadowParam() 83 auto colorName = prefix + std::string(attrs[3]) + suffix; in ParseShadowParam() 85 auto radiusName = prefix + std::string(attrs[4]) + suffix; in ParseShadowParam()
|
/foundation/ability/idl_tool/idl_tool_2/util/ |
H A D | string_helper.cpp | 64 bool StringHelper::EndWith(const std::string &value, char suffix)
in EndWith() argument 69 return value.back() == suffix;
in EndWith() 72 bool StringHelper::EndWith(const std::string &value, const std::string &suffix)
in EndWith() argument 74 size_t index = value.rfind(suffix);
in EndWith() 79 return index + suffix.size() == value.size();
in EndWith() 117 std::string suffix = value.substr(position);
in Replace() local 118 return prefix + Replace(suffix, substr, newstr);
in Replace() 128 std::string suffix = value.substr(position);
in Replace() local 129 return prefix + newStr + suffix;
in Replace()
|
/foundation/filemanagement/file_api/interfaces/kits/cj/src/ |
H A D | list_file.cpp | 34 for (string suffix : suffixs) { in CheckSuffix() 35 if (suffix.length() <= 1 || suffix.length() > MAX_SUFFIX_LENGTH) { in CheckSuffix() 38 if (suffix[0] != '.') { in CheckSuffix() 41 for (size_t i = 1; i < suffix.length(); i++) { in CheckSuffix() 42 if (!isalnum(suffix[i])) { in CheckSuffix() 64 if (cFilter.suffix.size != 0) { in GetFileFilterParam() 65 auto suffix = CArrStringToVector(cFilter.suffix); in GetFileFilterParam() local 66 if (!CheckSuffix(suffix) || suffi in GetFileFilterParam() [all...] |
/foundation/arkui/ace_engine/frameworks/core/image/ |
H A D | image_file_cache.cpp | 102 const std::string& fileCacheKey, const std::string& suffix) in WriteFile() 104 std::string writeFilePath = ConstructCacheFilePath(fileCacheKey + suffix); in WriteFile() 149 RefPtr<NG::ImageData> ImageFileCache::GetDataFromCacheFile(const std::string& url, const std::string& suffix) in GetDataFromCacheFile() argument 152 auto filePath = GetCacheFilePathInner(url, suffix); in GetDataFromCacheFile() 165 void ImageFileCache::SaveCacheInner(const std::string& cacheKey, const std::string& suffix, size_t cacheSize, in SaveCacheInner() argument 168 auto cacheFileName = cacheKey + suffix; in SaveCacheInner() 181 infoIter->accessCount = static_cast<uint32_t>(suffix == ASTC_SUFFIX ? convertAstcThreshold : 1); in SaveCacheInner() 184 suffix == ASTC_SUFFIX ? convertAstcThreshold : 1); in SaveCacheInner() 225 void ImageFileCache::WriteCacheFile(const std::string& url, const void* data, size_t size, const std::string& suffix) in WriteCacheFile() argument 233 auto writeFilePath = ConstructCacheFilePath(fileCacheKey + suffix); in WriteCacheFile() 101 WriteFile(const std::string& url, const void* const data, size_t size, const std::string& fileCacheKey, const std::string& suffix) WriteFile() argument 339 GetCacheFilePathInner(const std::string& url, const std::string& suffix) GetCacheFilePathInner() argument [all...] |
H A D | image_file_cache.h | 58 RefPtr<NG::ImageData> GetDataFromCacheFile(const std::string& url, const std::string& suffix); 62 const std::string& url, const void* data, size_t size, const std::string& suffix = std::string()); 68 void SaveCacheInner(const std::string& cacheKey, const std::string& suffix, size_t cacheSize, 70 std::string GetCacheFilePathInner(const std::string& url, const std::string& suffix); 74 const std::string& fileCacheKey, const std::string& suffix);
|
/foundation/filemanagement/file_api/interfaces/kits/js/src/common/ |
H A D | file_filter.h | 31 explicit FileFilter(std::vector<std::string> suffix): suffix_(suffix) {} in FileFilter() argument 35 void SetSuffix(const std::vector<std::string> &suffix) in SetSuffix() argument 37 suffix_ = suffix; in SetSuffix() 185 FileFilterBuilder& SetSuffix(const std::vector<std::string> &suffix) in SetSuffix() argument 187 fileFilter_.SetSuffix(suffix); in SetSuffix()
|
/foundation/filemanagement/user_file_service/frameworks/js/napi/file_access_module/ |
H A D | napi_utils.cpp | 46 for (std::string suffix : suffixs) { in CheckSuffix() 47 if (suffix.length() <= 1 || suffix.length() > MAX_SUFFIX_LENGTH) { in CheckSuffix() 50 if (suffix[0] != '.') { in CheckSuffix() 53 for (size_t i = 1; i < suffix.length(); i++) { in CheckSuffix() 54 if (!isalnum(suffix[i])) { in CheckSuffix() 65 if (argv.HasProp("suffix")) { in GetSuffix() 67 std::tie(ret, suffixs, std::ignore) = argv.GetProp("suffix").ToStringArray(); in GetSuffix() 69 HILOG_ERROR("FileFilter get suffix param fail."); in GetSuffix()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/verify/ |
H A D | verify_manager_host_impl.cpp | 73 bool GetDataDir(const std::string &path, std::string &suffix, std::string &el, std::string &baseType) in GetDataDir() argument 76 suffix = path.substr(strlen(DATA_STORAGE_EL1_BASE)); in GetDataDir() 83 suffix = path.substr(strlen(DATA_STORAGE_EL1_DATABASE)); in GetDataDir() 90 suffix = path.substr(strlen(DATA_STORAGE_EL2_BASE)); in GetDataDir() 97 suffix = path.substr(strlen(DATA_STORAGE_EL2_DATABASE)); in GetDataDir() 104 suffix = path.substr(strlen(DATA_STORAGE_EL3_BASE)); in GetDataDir() 111 suffix = path.substr(strlen(DATA_STORAGE_EL3_DATABASE)); in GetDataDir() 118 suffix = path.substr(strlen(DATA_STORAGE_EL4_BASE)); in GetDataDir() 125 suffix = path.substr(strlen(DATA_STORAGE_EL4_DATABASE)); in GetDataDir() 255 auto suffix in GetRealPath() local 261 std::string suffix; GetRealPath() local [all...] |
/foundation/filemanagement/app_file_service/utils/src/b_tarball/ |
H A D | b_tarball_factory.cpp | 133 if (auto suffix = string_view(".tar"); in GetTarballDirAndName() 134 tarballPath.length() <= suffix.length() || in GetTarballDirAndName() 135 !equal(tarballPath.rbegin(), next(tarballPath.rbegin(), suffix.length()), suffix.rbegin(), suffix.rend())) { in GetTarballDirAndName()
|
/foundation/filemanagement/user_file_service/interfaces/kits/js/src/common/ |
H A D | file_filter.h | 30 FileFilter(std::vector<std::string> suffix, std::vector<std::string> displayName, in FileFilter() argument 33 : suffix_(suffix), displayName_(displayName), mimeType_(mimeType), fileSizeOver_(fileSizeOver), in FileFilter() 39 void SetSuffix(const std::vector<std::string> &suffix) in SetSuffix() argument 41 suffix_ = suffix; in SetSuffix()
|
/foundation/multimedia/media_library/frameworks/services/media_thumbnail/include/ |
H A D | thumbnail_const.h | 175 std::string suffix = (key == "THM_ASTC") ? ".astc" : ".jpg"; in GetThumbnailPath() local 176 return ROOT_MEDIA_DIR + ".thumbs/" + path.substr(ROOT_MEDIA_DIR.length()) + "/" + key + suffix; in GetThumbnailPath() 185 std::string suffix = (key == "THM_ASTC") ? ".astc" : ".jpg"; in GetThumbnailPathHighlight() local 187 "/beginTimeStamp" + timeStamp + "/" + key + suffix; in GetThumbnailPathHighlight() 241 std::string suffix = (type == ThumbnailType::THUMB_ASTC) ? ".astc" : ".jpg"; in GetSandboxPath() local 242 std::string suffixStr = path.substr(ROOT_MEDIA_DIR.length()) + "/" + GetThumbSuffix(type) + suffix; in GetSandboxPath() 252 std::string suffix = (type == KEY_FRAME_THM_ASTC) ? ".astc" : ".jpg"; in GetKeyFrameSandboxPath() local 254 "/" + GetKeyFrameThumbSuffix(type) + suffix; in GetKeyFrameSandboxPath()
|
/foundation/ai/intelligent_voice_framework/services/intell_voice_engine/server/base/ |
H A D | audio_debug.cpp | 29 void AudioDebug::CreateAudioDebugFile(const std::string &suffix) in CreateAudioDebugFile() argument 33 auto path = PCM_DIR + OHOS::IntellVoiceUtils::TimeUtil::GetCurrTime() + suffix+ ".pcm"; in CreateAudioDebugFile() 58 void AudioDebug::CreateAudioDebugFile(const std::string & /* suffix */)
|
/foundation/multimedia/av_session/services/session/server/softbus/ |
H A D | softbus_session_utils.h | 35 std::string suffix = deviceId.substr(deviceId.length() - index, deviceId.length());
in AnonymizeDeviceId() local 36 return prefix + std::string(DEVICE_ANONYMIZE_ID) + suffix;
in AnonymizeDeviceId()
|
/foundation/distributeddatamgr/preferences/frameworks/native/src/ |
H A D | preferences_utils.cpp | 26 std::string MakeFilePath(const std::string &prefPath, const std::string &suffix) in MakeFilePath() argument 28 return prefPath + suffix; in MakeFilePath()
|
/foundation/arkui/ace_engine/frameworks/base/utils/ |
H A D | string_expression.cpp | 44 substr = result.suffix().str(); in CheckCalcIsValid() 48 substr = leftBracket.suffix().str(); in CheckCalcIsValid() 54 substr = result.suffix().str(); in CheckCalcIsValid() 58 substr = rightBracket.suffix().str(); in CheckCalcIsValid() 64 formulaNoSpace = result.suffix().str(); in CheckCalcIsValid() 89 leftstr = result.suffix().str(); in ReplaceSignNumber() 117 leftstr = result.suffix().str(); in ReplaceSignNumberWithUnit()
|
/foundation/communication/netmanager_base/services/netmanagernative/src/netsys/dnsresolv/ |
H A D | dns_param_cache.cpp | 508 std::string suffix(domain); in BuildFirewallDomainLsmTrie() 509 auto wildcardCharIndex = suffix.find('*'); in BuildFirewallDomainLsmTrie() 511 suffix = suffix.substr(wildcardCharIndex + 1); in BuildFirewallDomainLsmTrie() 513 DNS_CONFIG_PRINT("BuildFirewallDomainLsmTrie: suffix: %{public}s", suffix.c_str()); in BuildFirewallDomainLsmTrie() 514 std::transform(suffix.begin(), suffix.end(), suffix.begin(), ::tolower); in BuildFirewallDomainLsmTrie() 516 if (domainDenyLsmTrie_->LongestSuffixMatch(suffix, rule in BuildFirewallDomainLsmTrie() [all...] |
/foundation/resourceschedule/ffrt/tools/ffrt_trace_process/ |
H A D | ffrt_trace_process.py | 221 def generate_counter_info(suffix, task_records, next_status, gid, pid_counters_dict, pid): 231 info = suffix + "C|" + str(pid) + "|" + next_counter + "|" + str(pid_counters_dict[next_counter]) + '\n' 236 info = suffix + "C|" + str(pid) + "|" + prev_counter + "|" + str(pid_counters_dict[prev_counter]) + '\n' 293 suffix = log[:log.find("tracing_mark_write: ") + len("tracing_mark_write: ")] 316 line_total_task = "%sC|%d|total_task|%s\n" % (suffix, pid, str(pid_counters_dict['total_task'])) 319 infos = generate_counter_info(suffix, task_records, "pending", gid, pid_counters_dict, pid) 333 infos = generate_counter_info(suffix, task_records, "ready", gid, pid_counters_dict, pid) 352 infos = generate_counter_info(suffix, task_records, "running", gid, pid_counters_dict, pid) 366 infos = generate_counter_info(suffix, task_records, "blocked", gid, pid_counters_dict, pid) 380 infos = generate_counter_info(suffix, task_record [all...] |