Home
last modified time | relevance | path

Searched refs:pattern (Results 1 – 25 of 37) 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 …]
Dmeasure_format_impl.cpp90 …concatenate = sprintf_s(result, MAX_MEASURE_FORMAT_LENGTH, pattern.c_str(), formattedNumber.c_str(… in FormatInner()
93 … concatenate = sprintf_s(result, MAX_MEASURE_FORMAT_LENGTH, pattern.c_str(), formattedUnit.c_str(), in FormatInner()
207 pattern = items[2]; in InitMeasureFormat()
/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 &…
Dmeasure_format_impl.h52 std::string pattern; variable
/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/hilog/services/hilogd/
Dkmsg_parser.cpp59 static const std::string pattern = "(\\d+),(\\d+),(\\d+),(\\S);"; in ParseHeader() local
60 static const std::regex express(pattern); in ParseHeader()
72 static const std::string pattern = "\\[pid=(\\d+)\\]"; in ParsePid() local
73 static const std::regex express(pattern); in ParsePid()
85 static const std::string pattern = "\\[.*?\\]"; in ParseTag() local
86 static const std::regex express(pattern); in ParseTag()
/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.cpp136 std::vector<std::string> EdmCommand::split(const std::string &str, const std::string &pattern) in split() argument
142 std::string strs = str + pattern; in split()
143 size_t pos = strs.find(pattern); in split()
149 pos = strs.find(pattern); in split()
/base/hiviewdfx/hilog/test/unittest/common/
Dhilogtool_test.cpp692 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
698 EXPECT_TRUE(regex_match(it.substr(0, 18), pattern));
702 pattern = ("\\d{0,10}.\\d{3}$");
706 EXPECT_TRUE(regex_match(it.substr(0, 14), pattern));
710 pattern = ("\\d{0,8}.\\d{3}$");
719 EXPECT_TRUE(regex_match(str, pattern));
724 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])"
729 EXPECT_TRUE(regex_match(it.substr(0, 18), pattern));
733 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])"
738 EXPECT_TRUE(regex_match(it.substr(0, 21), pattern));
[all …]
/base/request/request/upload/frameworks/libs/src/
Dobtain_file.cpp106 std::string pattern = "internal://cache/"; in SplitPath() local
107 size_t pos = fileUri.find(pattern); in SplitPath()
112 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/security/selinux/scripts/
Dbuild_contexts.py86 pattern = re.compile(r'(\S+)\s+u:object_r:\S+:s0')
93 match = pattern.match(line_)
152 pattern = re.compile(
161 match = pattern.match(line_)
/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/hiviewdfx/hiview/utility/smart_parser/feature_analysis/
Dlog_util.cpp266 const string& pattern, string& desPath) in IsTestModel() argument
272 …std::string fileName = pattern.find("/") != std::string::npos ? StringUtil::GetRrightSubstr(patter… in IsTestModel()
/base/telephony/cellular_call/services/common/src/
Dmmi_code_utils.cpp136 std::regex pattern(symbols); in RegexMatchMmi() local
138 if (regex_match(analyseString, results, pattern)) { in RegexMatchMmi()
/base/global/i18n_lite/interfaces/kits/i18n/include/
Ddate_time_format.h115 void ApplyPattern(const AvailableDateTimeFormatPattern &pattern);
/base/startup/init/test/unittest/ueventd/
Dueventd_config_unittest.cpp28 bool IsMatch(const char *target, const char *pattern);
/base/startup/init/ueventd/
Dueventd_read_cfg.c290 bool IsMatch(const char *target, const char *pattern) in IsMatch() argument
293 INIT_CHECK_RETURN_VALUE(pattern != NULL, true); in IsMatch()
296 const char *p = pattern; in IsMatch()
/base/hiviewdfx/hiview/utility/smart_parser/feature_analysis/include/
Dlog_util.h53 const std::string& pattern, std::string& desPath);

12