summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/common/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'deps/icu-small/source/common/util.cpp')
-rw-r--r--deps/icu-small/source/common/util.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/deps/icu-small/source/common/util.cpp b/deps/icu-small/source/common/util.cpp
index 838a201a73..56dd4f1bfa 100644
--- a/deps/icu-small/source/common/util.cpp
+++ b/deps/icu-small/source/common/util.cpp
@@ -276,6 +276,16 @@ int32_t ICU_Utility::parsePattern(const UnicodeString& pat,
return -1; // text ended before end of pat
}
+int32_t ICU_Utility::parseAsciiInteger(const UnicodeString& str, int32_t& pos) {
+ int32_t result = 0;
+ UChar c;
+ while (pos < str.length() && (c = str.charAt(pos)) >= u'0' && c <= u'9') {
+ result = result * 10 + (c - u'0');
+ pos++;
+ }
+ return result;
+}
+
/**
* Append a character to a rule that is being built up. To flush
* the quoteBuf to rule, make one final call with isLiteral == TRUE.