Lines Matching defs:string
14 #include <string>
38 std::string ToHourCycleString(JSDateTimeFormat::HourCycle hc) {
55 JSDateTimeFormat::HourCycle ToHourCycle(const std::string& hc) {
90 PatternMap(std::string pattern, std::string value)
93 std::string pattern;
94 std::string value;
99 PatternItem(const std::string property, std::vector<PatternMap> pairs,
106 const std::string property;
203 PatternData(const std::string property, std::vector<PatternMap> pairs,
212 const std::string property;
213 std::map<const std::string, const std::string> map;
305 std::string GetGMTTzID(const std::string& input) {
306 std::string ret = "Etc/GMT";
349 std::string ToTitleCaseTimezoneLocation(const std::string& input) {
350 std::string title_cased;
362 std::string substr = title_cased.substr(pos, 2);
371 return std::string();
399 std::string Find(const std::string& id) {
409 std::string upper(id);
414 std::map<std::string, std::string> map_;
420 // return empty string when error.
421 std::string JSDateTimeFormat::CanonicalizeTimeZoneID(const std::string& input) {
422 std::string upper = input;
445 std::string title = ToTitleCaseTimezoneLocation(input);
461 std::string special_case = special_time_zone_map.Pointer()->Find(upper);
485 int FractionalSecondDigitsFromPattern(const std::string& pattern) {
535 std::string calendar_str = simple_date_format.getCalendar()->getType();
600 std::string numbering_system = Intl::GetNumberingSystem(*icu_locale);
604 std::string pattern;
704 if (pattern.find(pair.pattern) != std::string::npos) {
828 // We only cache the instance when locales is a string/undefined and
906 const std::vector<std::string>& props) {
1014 const std::vector<std::string> list({"year", "month", "day"});
1020 const std::vector<std::string> list({"hour", "minute", "second"});
1064 std::string canonicalized = CanonicalizeTimeZoneID(timezone);
1081 std::string key;
1082 tz_id.toUTF8String<std::string>(key);
1118 std::map<std::string, std::unique_ptr<icu::Calendar>> map_;
1217 std::string key;
1218 skeleton.toUTF8String<std::string>(key);
1239 std::map<std::string, std::unique_ptr<icu::SimpleDateFormat>> map_;
1278 std::string hcString = ToHourCycleString(date_time_format->hour_cycle());
1422 if (!icu_locale.getUnicodeKeywordValue<std::string>("nu", status).empty()) {
1430 if (!icu_locale.getUnicodeKeywordValue<std::string>("hc", status).empty()) {
1438 if (!icu_locale.getUnicodeKeywordValue<std::string>("ca", status).empty()) {
1468 std::string key(locale.getName());
1501 std::map<std::string, std::unique_ptr<icu::DateTimePatternGenerator>> map_;
1515 Maybe<std::vector<std::string>> maybe_requested_locales =
1518 std::vector<std::string> requested_locales =
1528 // 4. Let matcher be ? GetOption(options, "localeMatcher", "string",
1540 // "string", undefined, undefined).
1556 // "string", undefined, undefined).
1568 // 7. Let hourCycle be ? GetOption(options, "hourCycle", "string", « "h11",
1584 std::set<std::string> relevant_extension_keys = {"nu", "ca", "hc"};
1728 std::string skeleton;
1745 // ii. Let value be ? GetOption(options, prop, "string", « the strings
1761 // 29. Let matcher be ? GetOption(options, "formatMatcher", "string", «
1765 // c. Let matcher be ? GetOption(options, "formatMatcher", "string",
1776 // 32. Let dateStyle be ? GetOption(options, "dateStyle", "string", «
1788 // 34. Let timeStyle be ? GetOption(options, "timeStyle", "string", «
1817 std::string prop;
1820 if (skeleton.find(pair.pattern) != std::string::npos) {
1829 if (prop.empty() && skeleton.find("S") != std::string::npos) {
1913 Maybe<std::string> maybe_locale_str = Intl::ToLanguageTag(resolved_locale);
2088 const std::set<std::string>& JSDateTimeFormat::GetAvailableLocales() {
2112 Isolate* isolate, Handle<JSArray> array, const icu::UnicodeString& string,
2117 Intl::ToString(isolate, string, start, end),