Lines Matching defs:string
87 * from a short string. Also used to construct a short string from a
145 /* function prototype for functions used to parse a short string */
148 ActionFunction(CollatorSpec *spec, uint32_t value1, const char* string,
154 _processLocaleElement(CollatorSpec *spec, uint32_t value, const char* string,
160 spec->locElements[value][len++] = uprv_tolower(*string);
162 spec->locElements[value][len++] = *string;
164 } while(*(++string) != '_' && *string && len < locElementCapacity);
167 return string;
170 return string;
176 _processRFC3066Locale(CollatorSpec *spec, uint32_t, const char* string,
179 char terminator = *string;
180 string++;
181 const char *end = uprv_strchr(string+1, terminator);
182 if(end == NULL || end - string >= loc3066Capacity) {
184 return string;
186 uprv_strncpy(spec->locale, string, end-string);
195 _processCollatorOption(CollatorSpec *spec, uint32_t option, const char* string,
198 spec->options[option] = ucol_sit_letterToAttributeValue(*string, status);
199 if((*(++string) != '_' && *string) || U_FAILURE(*status)) {
201 fprintf(stderr, "%s:%d: unknown collator option at '%s': %s\n", __FILE__, __LINE__, string, u_errorName(*status));
205 return string;
211 readHexCodeUnit(const char **string, UErrorCode *status)
217 while((c = **string) != 0 && noDigits < 4) {
227 fprintf(stderr, "%s:%d: Bad hex char at '%s': %s\n", __FILE__, __LINE__, *string, u_errorName(*status));
233 (*string)++;
235 // if the string was terminated before we read 4 digits, set an error
239 fprintf(stderr, "%s:%d: Short (only %d digits, wanted 4) at '%s': %s\n", __FILE__, __LINE__, noDigits,*string, u_errorName(*status));
247 _processVariableTop(CollatorSpec *spec, uint32_t value1, const char* string, UErrorCode *status)
252 while(U_SUCCESS(*status) && i < locElementCapacity && *string != 0 && *string != '_') {
253 spec->variableTopString[i++] = readHexCodeUnit(&string, status);
256 if(i == locElementCapacity && *string != 0 && *string != '_') {
260 spec->variableTopValue = readHexCodeUnit(&string, status);
265 return string;
333 ucol_sit_readSpecs(CollatorSpec *s, const char *string,
336 const char *definition = string;
337 while(U_SUCCESS(*status) && *string) {
338 string = ucol_sit_readOption(string, s, status);
340 while(*string && *string == '_') {
341 string++;
345 parseError->offset = (int32_t)(string - definition);
347 return string;
446 // first we want to pick stuff out of short string.
450 // analyse the string in order to get everything we need.
494 UTRACE_DATA1(UTRACE_INFO, "short string = \"%s\"", definition);
509 // first we want to pick stuff out of short string.
513 // analyse the string in order to get everything we need.
514 const char *string = definition;
517 string = ucol_sit_readSpecs(&s, definition, parseError, status);
534 parseError->offset = (int32_t)(string - definition);