295 bool all_one_case =
true;
308 first_upper = isupper(str32[0]);
309 first_lower = islower(str32[0]);
312 prev_upper = first_upper;
313 prev_lower = islower(str32[0]);
314 for (
int c = 1; str32[c] != 0; ++c) {
315 cur_upper = isupper(str32[c]);
316 cur_lower = islower(str32[c]);
317 if ((prev_upper && cur_lower) || (prev_lower && cur_upper))
318 all_one_case =
false;
321 prev_upper = cur_upper;
322 prev_lower = cur_lower;
325 UNICHARSET *unicharset = char_set->InternalUnicharset();
327 first_upper = unicharset->
get_isupper(char_set->ClassID(str32[0]));
328 first_lower = unicharset->
get_islower(char_set->ClassID(str32[0]));
331 prev_upper = first_upper;
332 prev_lower = unicharset->
get_islower(char_set->ClassID(str32[0]));
334 for (
int c = 1; c <
StrLen(str32); ++c) {
335 cur_upper = unicharset->
get_isupper(char_set->ClassID(str32[c]));
336 cur_lower = unicharset->
get_islower(char_set->ClassID(str32[c]));
337 if ((prev_upper && cur_lower) || (prev_lower && cur_upper))
338 all_one_case =
false;
341 prev_upper = cur_upper;
342 prev_lower = cur_lower;
345 return all_one_case || capitalized;
bool get_isupper(UNICHAR_ID unichar_id) const
bool get_islower(UNICHAR_ID unichar_id) const
static int StrLen(const char_32 *str)