Lines Matching defs:str

83 static int32_t parseAsciiDigits(const UnicodeString& str, int32_t start, int32_t length, UErrorCode& status) {
87 if (length <= 0 || str.length() < start || (start + length) > str.length()) {
92 if (str.charAt(start) == PLUS) {
95 } else if (str.charAt(start) == MINUS) {
102 int32_t digit = str.charAt(start + i) - 0x0030;
112 static UnicodeString& appendAsciiDigits(int32_t number, uint8_t length, UnicodeString& str) {
139 str.append(MINUS);
142 str.append((char16_t)(digits[i] + 0x0030));
144 return str;
147 static UnicodeString& appendMillis(UDate date, UnicodeString& str) {
171 str.append(MINUS);
175 str.append((char16_t)(digits[i--] + 0x0030));
177 return str;
183 static UnicodeString& getDateTimeString(UDate time, UnicodeString& str) {
187 str.remove();
188 appendAsciiDigits(year, 4, str);
189 appendAsciiDigits(month + 1, 2, str);
190 appendAsciiDigits(dom, 2, str);
191 str.append((char16_t)0x0054 /*'T'*/);
200 appendAsciiDigits(hour, 2, str);
201 appendAsciiDigits(min, 2, str);
202 appendAsciiDigits(sec, 2, str);
203 return str;
209 static UnicodeString& getUTCDateTimeString(UDate time, UnicodeString& str) {
210 getDateTimeString(time, str);
211 str.append((char16_t)0x005A /*'Z'*/);
212 return str;
219 static UDate parseDateTimeString(const UnicodeString& str, int32_t offset, UErrorCode& status) {
228 int length = str.length();
234 if (str.charAt(8) != 0x0054) {
239 if (str.charAt(15) != 0x005A) {
246 year = parseAsciiDigits(str, 0, 4, status);
247 month = parseAsciiDigits(str, 4, 2, status) - 1; // 0-based
248 day = parseAsciiDigits(str, 6, 2, status);
249 hour = parseAsciiDigits(str, 9, 2, status);
250 min = parseAsciiDigits(str, 11, 2, status);
251 sec = parseAsciiDigits(str, 13, 2, status);
283 static int32_t offsetStrToMillis(const UnicodeString& str, UErrorCode& status) {
292 int length = str.length();
298 char16_t s = str.charAt(0);
307 hour = parseAsciiDigits(str, 1, 2, status);
308 min = parseAsciiDigits(str, 3, 2, status);
310 sec = parseAsciiDigits(str, 5, 2, status);
329 static void millisToOffset(int32_t millis, UnicodeString& str) {
330 str.remove();
332 str.append(PLUS);
334 str.append(MINUS);
345 appendAsciiDigits(hour, 2, str);
346 appendAsciiDigits(min, 2, str);
347 appendAsciiDigits(sec, 2, str);
887 void write(const UnicodeString& str);
889 void write(const char16_t* str);
890 //void write(const char16_t* str, int32_t length);
903 VTZWriter::write(const UnicodeString& str) {
904 out->append(str);
913 VTZWriter::write(const char16_t* str) {
914 out->append(str, -1);
919 VTZWriter::write(const char16_t* str, int32_t length) {
920 out->append(str, length);