362 bool all_one_case =
true;
375 first_upper = isupper(str32[0]);
376 first_lower = islower(str32[0]);
379 prev_upper = first_upper;
380 prev_lower = islower(str32[0]);
381 for (
int c = 1; str32[c] != 0; ++c) {
382 cur_upper = isupper(str32[c]);
383 cur_lower = islower(str32[c]);
384 if ((prev_upper && cur_lower) || (prev_lower && cur_upper))
385 all_one_case =
false;
388 prev_upper = cur_upper;
389 prev_lower = cur_lower;
392 UNICHARSET *unicharset = char_set->InternalUnicharset();
394 first_upper = unicharset->
get_isupper(char_set->ClassID(str32[0]));
395 first_lower = unicharset->
get_islower(char_set->ClassID(str32[0]));
398 prev_upper = first_upper;
399 prev_lower = unicharset->
get_islower(char_set->ClassID(str32[0]));
401 for (
int c = 1; c <
StrLen(str32); ++c) {
402 cur_upper = unicharset->
get_isupper(char_set->ClassID(str32[c]));
403 cur_lower = unicharset->
get_islower(char_set->ClassID(str32[c]));
404 if ((prev_upper && cur_lower) || (prev_lower && cur_upper))
405 all_one_case =
false;
408 prev_upper = cur_upper;
409 prev_lower = cur_lower;
412 return all_one_case || capitalized;
static int StrLen(const char_32 *str)
bool get_islower(UNICHAR_ID unichar_id) const
bool get_isupper(UNICHAR_ID unichar_id) const