Lines Matching defs:string
86 * from a short string. Also used to construct a short string from a
159 /* function prototype for functions used to parse a short string */
162 ActionFunction(CollatorSpec *spec, uint32_t value1, const char* string,
168 _processLocaleElement(CollatorSpec *spec, uint32_t value, const char* string,
174 spec->locElements[value][len++] = uprv_tolower(*string);
176 spec->locElements[value][len++] = *string;
178 } while(*(++string) != '_' && *string && len < locElementCapacity);
181 return string;
184 return string;
190 _processRFC3066Locale(CollatorSpec *spec, uint32_t, const char* string,
193 char terminator = *string;
194 string++;
195 const char *end = uprv_strchr(string+1, terminator);
196 if(end == NULL || end - string >= loc3066Capacity) {
198 return string;
200 uprv_strncpy(spec->locale, string, end-string);
209 _processCollatorOption(CollatorSpec *spec, uint32_t option, const char* string,
212 spec->options[option] = ucol_sit_letterToAttributeValue(*string, status);
213 if((*(++string) != '_' && *string) || U_FAILURE(*status)) {
215 fprintf(stderr, "%s:%d: unknown collator option at '%s': %s\n", __FILE__, __LINE__, string, u_errorName(*status));
219 return string;
225 readHexCodeUnit(const char **string, UErrorCode *status)
231 while((c = **string) != 0 && noDigits < 4) {
241 fprintf(stderr, "%s:%d: Bad hex char at '%s': %s\n", __FILE__, __LINE__, *string, u_errorName(*status));
247 (*string)++;
249 // if the string was terminated before we read 4 digits, set an error
253 fprintf(stderr, "%s:%d: Short (only %d digits, wanted 4) at '%s': %s\n", __FILE__, __LINE__, noDigits,*string, u_errorName(*status));
261 _processVariableTop(CollatorSpec *spec, uint32_t value1, const char* string, UErrorCode *status)
266 while(U_SUCCESS(*status) && i < locElementCapacity && *string != 0 && *string != '_') {
267 spec->variableTopString[i++] = readHexCodeUnit(&string, status);
270 if(i == locElementCapacity && *string != 0 && *string != '_') {
274 spec->variableTopValue = readHexCodeUnit(&string, status);
279 return string;
347 ucol_sit_readSpecs(CollatorSpec *s, const char *string,
350 const char *definition = string;
351 while(U_SUCCESS(*status) && *string) {
352 string = ucol_sit_readOption(string, s, status);
354 while(*string && *string == '_') {
355 string++;
359 parseError->offset = (int32_t)(string - definition);
361 return string;
460 // first we want to pick stuff out of short string.
464 // analyse the string in order to get everything we need.
508 UTRACE_DATA1(UTRACE_INFO, "short string = \"%s\"", definition);
523 // first we want to pick stuff out of short string.
527 // analyse the string in order to get everything we need.
528 const char *string = definition;
531 string = ucol_sit_readSpecs(&s, definition, parseError, status);
548 parseError->offset = (int32_t)(string - definition);