Lines Matching refs:reslen
632 int32_t reslen = 0;
650 if (reslen < capacity) {
651 uprv_memcpy(appendAt + reslen, LANG_UND, uprv_min(LANG_UND_LEN, capacity - reslen));
653 reslen += LANG_UND_LEN;
660 if (reslen < capacity) {
661 uprv_memcpy(appendAt + reslen, LANG_UND, uprv_min(LANG_UND_LEN, capacity - reslen));
663 reslen += LANG_UND_LEN;
673 if (reslen < capacity) {
674 uprv_memcpy(appendAt + reslen, buf, uprv_min(len, capacity - reslen));
676 reslen += len;
678 u_terminateChars(appendAt, capacity, reslen, status);
679 return reslen;
687 int32_t reslen = 0;
709 if (reslen < capacity) {
710 *(appendAt + reslen) = SEP;
712 reslen++;
714 if (reslen < capacity) {
715 uprv_memcpy(appendAt + reslen, buf, uprv_min(len, capacity - reslen));
717 reslen += len;
720 u_terminateChars(appendAt, capacity, reslen, status);
721 return reslen;
729 int32_t reslen = 0;
751 if (reslen < capacity) {
752 *(appendAt + reslen) = SEP;
754 reslen++;
756 if (reslen < capacity) {
757 uprv_memcpy(appendAt + reslen, buf, uprv_min(len, capacity - reslen));
759 reslen += len;
762 u_terminateChars(appendAt, capacity, reslen, status);
763 return reslen;
771 int32_t reslen = 0;
859 if (reslen < capacity) {
860 *(appendAt + reslen) = SEP;
862 reslen++;
864 if (reslen < capacity) {
865 uprv_memcpy(appendAt + reslen, var->variant, uprv_min(varLen, capacity - reslen));
867 reslen += varLen;
886 u_terminateChars(appendAt, capacity, reslen, status);
887 return reslen;
897 int32_t reslen = 0;
1110 if (reslen < capacity) {
1111 *(appendAt + reslen) = SEP;
1113 reslen++;
1114 if (reslen < capacity) {
1115 *(appendAt + reslen) = LDMLEXT;
1117 reslen++;
1124 if (reslen < capacity) {
1125 *(appendAt + reslen) = SEP;
1127 reslen++;
1129 if (reslen < capacity) {
1130 uprv_memcpy(appendAt + reslen, ext->key, uprv_min(len, capacity - reslen));
1132 reslen += len;
1133 if (reslen < capacity) {
1134 *(appendAt + reslen) = SEP;
1136 reslen++;
1138 if (reslen < capacity) {
1139 uprv_memcpy(appendAt + reslen, ext->value, uprv_min(len, capacity - reslen));
1141 reslen += len;
1146 if (reslen < capacity) {
1147 *(appendAt + reslen) = SEP;
1149 reslen++;
1151 if (reslen < capacity) {
1152 uprv_memcpy(appendAt + reslen, attr->attribute, uprv_min(len, capacity - reslen));
1154 reslen += len;
1185 return u_terminateChars(appendAt, capacity, reslen, status);
1501 int32_t reslen = 0;
1575 if (reslen < capacity) {
1576 uprv_memcpy(appendAt + reslen, _POSIX, uprv_min(len, capacity - reslen));
1578 reslen += len;
1586 if (reslen < capacity) {
1589 *(appendAt + reslen) = LOCALE_EXT_SEP;
1593 *(appendAt + reslen) = LOCALE_KEYWORD_SEP;
1596 reslen++;
1600 if (reslen < capacity) {
1601 uprv_memcpy(appendAt + reslen, kwd->key, uprv_min(len, capacity - reslen));
1603 reslen += len;
1606 if (reslen < capacity) {
1607 *(appendAt + reslen) = LOCALE_KEY_TYPE_SEP;
1609 reslen++;
1613 if (reslen < capacity) {
1614 uprv_memcpy(appendAt + reslen, kwd->value, uprv_min(len, capacity - reslen));
1616 reslen += len;
1636 return u_terminateChars(appendAt, capacity, reslen, status);
1645 int32_t reslen = 0;
1698 if (reslen < capacity) {
1699 tmpAppend[reslen++] = SEP;
1703 if (reslen < capacity) {
1704 tmpAppend[reslen++] = *PRIVATEUSE_KEY;
1707 if (reslen < capacity) {
1708 tmpAppend[reslen++] = SEP;
1712 if (reslen < capacity) {
1713 uprv_memcpy(tmpAppend + reslen, PRIVUSE_VARIANT_PREFIX, uprv_min(len, capacity - reslen));
1715 reslen += len;
1717 if (reslen < capacity) {
1718 tmpAppend[reslen++] = SEP;
1725 if (reslen < capacity) {
1726 uprv_memcpy(tmpAppend + reslen, pPriv, uprv_min(len, capacity - reslen));
1728 reslen += len;
1745 len = reslen;
1746 if (reslen < capacity) {
1747 uprv_memcpy(appendAt, tmpAppend, uprv_min(len, capacity - reslen));
1751 u_terminateChars(appendAt, capacity, reslen, status);
1753 return reslen;
2319 int32_t reslen = 0;
2357 reslen = len + 2;
2358 uprv_memcpy(langtag, buf, uprv_min(reslen, langtagCapacity));
2359 u_terminateChars(langtag, langtagCapacity, reslen, status);
2374 return reslen;
2379 reslen += _appendLanguageToLanguageTag(canonical, langtag, langtagCapacity, strict, status);
2380 reslen += _appendScriptToLanguageTag(canonical, langtag + reslen, langtagCapacity - reslen, strict, status);
2381 reslen += _appendRegionToLanguageTag(canonical, langtag + reslen, langtagCapacity - reslen, strict, status);
2382 reslen += _appendVariantsToLanguageTag(canonical, langtag + reslen, langtagCapacity - reslen, strict, &hadPosix, status);
2383 reslen += _appendKeywordsToLanguageTag(canonical, langtag + reslen, langtagCapacity - reslen, strict, hadPosix, status);
2384 reslen += _appendPrivateuseToLanguageTag(canonical, langtag + reslen, langtagCapacity - reslen, strict, hadPosix, status);
2386 return reslen;
2397 int32_t reslen = 0;
2413 if (reslen < localeIDCapacity) {
2414 uprv_memcpy(localeID, subtag, uprv_min(len, localeIDCapacity - reslen));
2416 reslen += len;
2424 if (reslen < localeIDCapacity) {
2425 *(localeID + reslen) = LOCALE_SEP;
2427 reslen++;
2432 if (reslen < localeIDCapacity) {
2434 *(localeID + reslen) = uprv_toupper(*p);
2436 *(localeID + reslen) = *p;
2439 reslen++;
2448 if (reslen < localeIDCapacity) {
2449 *(localeID + reslen) = LOCALE_SEP;
2451 reslen++;
2455 if (reslen < localeIDCapacity) {
2456 *(localeID + reslen) = uprv_toupper(*p);
2458 reslen++;
2468 if (reslen < localeIDCapacity) {
2469 *(localeID + reslen) = LOCALE_SEP;
2471 reslen++;
2476 if (reslen < localeIDCapacity) {
2477 *(localeID + reslen) = LOCALE_SEP;
2479 reslen++;
2483 if (reslen < localeIDCapacity) {
2484 *(localeID + reslen) = uprv_toupper(*p);
2486 reslen++;
2496 if (reslen == 0 && n > 0) {
2498 if (reslen < localeIDCapacity) {
2499 uprv_memcpy(localeID + reslen, LANG_UND, uprv_min(LANG_UND_LEN, localeIDCapacity - reslen));
2501 reslen += LANG_UND_LEN;
2503 len = _appendKeywords(lt, localeID + reslen, localeIDCapacity - reslen, status);
2504 reslen += len;
2508 return u_terminateChars(localeID, localeIDCapacity, reslen, status);