Home
last modified time | relevance | path

Searched refs:pattern (Results 1 – 25 of 47) sorted by relevance

12

/base/global/i18n_lite/frameworks/i18n/src/
Dnumber_data.cpp97 void NumberData::ParsePattern(const char *pattern, const int len) in ParsePattern() argument
99 bool isDec = CalculateDecLength(pattern, len); in ParsePattern()
100 CalculateIntLength(len - style.decLen, pattern, len, isDec); in ParsePattern()
101 if ((pattern != nullptr) && (strcmp(pattern, "#,##,##0.###")) == 0) { in ParsePattern()
107 bool NumberData::CalculateDecLength(const char *pattern, const int len) in CalculateDecLength() argument
109 if (pattern == nullptr || len <= 0) { in CalculateDecLength()
115 char temp = pattern[i]; in CalculateDecLength()
128 void NumberData::CalculateIntLength(int intEndPos, const char *pattern, const int len, bool isDec) in CalculateIntLength() argument
130 if (pattern == nullptr || len <= 0) { in CalculateIntLength()
138 if (pattern[intEndPos - 1] != '0') { in CalculateIntLength()
[all …]
Ddate_time_format_impl.cpp157 void DateTimeFormatImpl::Format(const struct tm &time, const string &pattern, string &appendTo, in Format() argument
163 for (size_t i = 0; i < pattern.size(); ++i) { in Format()
164 char current = pattern.at(i); in Format()
170 if ((i + 1 < pattern.size()) && pattern[i + 1] == QUOTE) { in Format()
446 char *pattern = GetNoAmPmPattern(fPattern, ret); in Get12HourTimeWithoutAmpm() local
447 if (pattern == nullptr) { in Get12HourTimeWithoutAmpm()
456 string tempPattern(pattern); in Get12HourTimeWithoutAmpm()
457 I18nFree(static_cast<void *>(pattern)); in Get12HourTimeWithoutAmpm()
465 char *pattern = nullptr; in GetNoAmPmPattern() local
469 pattern = static_cast<char*>(I18nMalloc(len - 1)); in GetNoAmPmPattern()
[all …]
/base/global/i18n/frameworks/intl/src/
Ddate_time_format.cpp159 simDateFormat->toPattern(pattern); in InitDateFormatWithoutConfigs()
161 dateIntvFormat = DateIntervalFormat::createInstance(pattern, locale, status); in InitDateFormatWithoutConfigs()
167 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("H")), in FixPatternPartOne()
169 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("k")), in FixPatternPartOne()
171 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("K")), in FixPatternPartOne()
174 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("h")), in FixPatternPartOne()
176 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("k")), in FixPatternPartOne()
178 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("K")), in FixPatternPartOne()
189 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("h")), in FixPatternPartTwo()
191 pattern.findAndReplace(icu::UnicodeString::fromUTF8(StringPiece("H")), in FixPatternPartTwo()
[all …]
/base/global/i18n_lite/frameworks/i18n/include/
Dnumber_data.h78 static bool IsNoBreakSpace(const char *pattern, const int len, bool order);
81 void ParsePattern(const char *pattern, const int len);
82 void ParsePercentPattern(const char *pattern, const int len);
83 void ParseOtherPerPattern(const char *pattern, const int len, const int perSignPos,
85 void CalculateIntLength(int intEndPos, const char *pattern, const int len, bool isDec);
86 bool CalculateDecLength(const char *pattern, const int len);
Ddate_time_format_impl.h60 void ApplyPattern(const AvailableDateTimeFormatPattern &pattern);
79 …void Format(const struct tm &time, const std::string &pattern, std::string &appendTo, I18nStatus &…
/base/update/updater/services/package/pkg_package/
Dpackages_info.cpp30 vector<string> SplitString(const string &str, const string &pattern) in SplitString() argument
33 if (pattern.empty()) { in SplitString()
37 size_t index = str.find_first_of(pattern, 0); in SplitString()
47 index = str.find_first_of(pattern, start); in SplitString()
85 const string pattern = "\n"; in GetOTAVersion() local
111 tmpVersionList = SplitString(str, pattern); in GetOTAVersion()
/base/hiviewdfx/hiview/utility/smart_parser/feature_analysis/
Dlog_util.cpp125 const string& pattern, string& desPath) in IsTestModel() argument
131 …std::string fileName = pattern.find("/") != std::string::npos ? StringUtil::GetRrightSubstr(patter… in IsTestModel()
/base/sensors/miscdevice/services/miscdevice_service/custom_vibrate_decode/src/
Ddefault_vibrator_decoder.cpp97 cJSON* pattern = parser.GetObjectItem(channel, "Pattern"); in ParseChannel() local
98 CHKPR(pattern, ERROR); in ParseChannel()
99 ret = ParsePattern(parser, pattern, vibrateSet); in ParseChannel()
114 int32_t DefaultVibratorDecoder::ParsePattern(const JsonParser &parser, cJSON *pattern, in ParsePattern() argument
117 if (!parser.IsArray(pattern)) { in ParsePattern()
121 int32_t size = parser.GetArraySize(pattern); in ParsePattern()
127 cJSON* item = parser.GetArrayItem(pattern, i); in ParsePattern()
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/java/ohos/global/i18n/
DMeasureFormatPatternFetcher.java65 String pattern = locale2Pattern.get(locale); in get() local
66 if (pattern == null) { in get()
69 return pattern; in get()
/base/customization/enterprise_device_management/tools/edm/src/
Dedm_command.cpp134 std::vector<std::string> EdmCommand::split(const std::string &str, const std::string &pattern) in split() argument
140 std::string strs = str + pattern; in split()
141 size_t pos = strs.find(pattern); in split()
147 pos = strs.find(pattern); in split()
/base/hiviewdfx/hilog/test/unittest/common/
Dhilogtool_test.cpp690 std::regex pattern("(0\\d{1}|1[0-2])-(0\\d{1}|[12]\\d{1}|3[01])\\s(0\\d{1}|1\\d{1}|2[0-3])" variable
696 EXPECT_TRUE(regex_match(it.substr(0, 18), pattern));
700 pattern = ("\\d{0,10}.\\d{3}$");
704 EXPECT_TRUE(regex_match(it.substr(0, 14), pattern));
708 pattern = ("\\d{0,8}.\\d{3}$");
717 EXPECT_TRUE(regex_match(str, pattern));
722 pattern = ("(0\\d{1}|1[0-2])-(0\\d{1}|[12]\\d{1}|3[01])\\s(0\\d{1}|1\\d{1}|2[0-3])"
727 EXPECT_TRUE(regex_match(it.substr(0, 18), pattern));
731 pattern = "(0\\d{1}|1[0-2])-(0\\d{1}|[12]\\d{1}|3[01])\\s(0\\d{1}|1\\d{1}|2[0-3])"
736 EXPECT_TRUE(regex_match(it.substr(0, 21), pattern));
[all …]
/base/request/request/frameworks/js/napi/src/upload/
Dobtain_file.cpp107 std::string pattern = "internal://cache/"; in SplitPath() local
108 size_t pos = fileUri.find(pattern); in SplitPath()
113 fileName = fileUri.substr(pattern.size(), fileUri.size()); in SplitPath()
/base/hiviewdfx/hiview/utility/smart_parser/rule/
Dextract_rule.cpp157 bool ExtractRule::IsMatchPath(const string& sourceFile, const string& name, const string& pattern, in IsMatchPath() argument
161 sourceFile.c_str(), name.c_str(), pattern.c_str()); in IsMatchPath()
164 if (LogUtil::IsTestModel(sourceFile, name, pattern, desPath)) { in IsMatchPath()
169 if (pattern.empty()) { in IsMatchPath()
175 StringUtil::SplitStr(pattern, "/", parts, false, false); in IsMatchPath()
/base/startup/init/test/moduletest/
Dtest_utils.h25 std::vector<std::string> Split(const std::string &str, const std::string &pattern);
Dtest_utils.cpp97 std::vector<std::string> Split(const std::string &str, const std::string &pattern) in Split() argument
103 pos = str.find_first_of(pattern, start); in Split()
/base/global/i18n_lite/frameworks/i18n/test/unittest/lite/common/
Di18n_test.cpp195 AvailableDateTimeFormatPattern pattern = AvailableDateTimeFormatPattern::HOUR_MINUTE; variable
196 DateTimeFormat *formatter = new DateTimeFormat(pattern, locale);
209 AvailableDateTimeFormatPattern pattern = AvailableDateTimeFormatPattern::HOUR_MINUTE; variable
210 DateTimeFormat formatter(pattern, locale);
225 AvailableDateTimeFormatPattern pattern = AvailableDateTimeFormatPattern::FULL; variable
226 DateTimeFormat formatter(pattern, locale);
243 AvailableDateTimeFormatPattern pattern = AvailableDateTimeFormatPattern::FULL; variable
244 DateTimeFormat formatter(pattern, locale);
261 AvailableDateTimeFormatPattern pattern = AvailableDateTimeFormatPattern::FULL; variable
262 DateTimeFormat formatter(pattern, locale);
[all …]
/base/customization/enterprise_device_management/tools/edm/include/
Dedm_command.h51 std::vector<std::string> split(const std::string &str, const std::string &pattern);
/base/sensors/miscdevice/services/miscdevice_service/custom_vibrate_decode/include/
Ddefault_vibrator_decoder.h37 …int32_t ParsePattern(const JsonParser &parser, cJSON *pattern, std::set<VibrateEvent> &vibrateSet);
/base/security/selinux_adapter/scripts/
Dbuild_contexts.py116 pattern = re.compile(r'(\S+)\s+u:object_r:\S+:s0')
123 match = pattern.match(line_)
193 pattern = re.compile(
202 match = pattern.match(line_)
/base/startup/appspawn/etc/sandbox/
Dappdata_sandbox_fixer.gni46 foreach(pattern, invoker.patterns) {
49 pattern,
/base/global/i18n_lite/interfaces/kits/i18n/include/
Ddate_time_format.h115 void ApplyPattern(const AvailableDateTimeFormatPattern &pattern);
/base/telephony/call_manager/utils/src/
Dcall_number_utils.cpp132 std::regex pattern(symbols); in RegexMatchMmi() local
134 if (regex_match(number, results, pattern)) { in RegexMatchMmi()
/base/hiviewdfx/hiview/utility/smart_parser/feature_analysis/include/
Dlog_util.h51 const std::string& pattern, std::string& desPath);
/base/telephony/cellular_call/services/common/src/
Dmmi_code_utils.cpp154 std::regex pattern(symbols); in RegexMatchMmi() local
156 if (regex_match(analyseString, results, pattern)) { in RegexMatchMmi()
/base/startup/init/test/unittest/ueventd/
Dueventd_config_unittest.cpp28 bool IsMatch(const char *target, const char *pattern);

12