271 bool all_one_case =
true;
284 first_upper = isupper(str32[0]);
285 first_lower = islower(str32[0]);
288 prev_upper = first_upper;
289 prev_lower = islower(str32[0]);
290 for (
int c = 1; str32[c] != 0; ++c) {
291 cur_upper = isupper(str32[c]);
292 cur_lower = islower(str32[c]);
293 if ((prev_upper && cur_lower) || (prev_lower && cur_upper))
294 all_one_case =
false;
297 prev_upper = cur_upper;
298 prev_lower = cur_lower;
301 UNICHARSET *unicharset = char_set->InternalUnicharset();
303 first_upper = unicharset->
get_isupper(char_set->ClassID(str32[0]));
304 first_lower = unicharset->
get_islower(char_set->ClassID(str32[0]));
307 prev_upper = first_upper;
308 prev_lower = unicharset->
get_islower(char_set->ClassID(str32[0]));
310 for (
int c = 1; c <
StrLen(str32); ++c) {
311 cur_upper = unicharset->
get_isupper(char_set->ClassID(str32[c]));
312 cur_lower = unicharset->
get_islower(char_set->ClassID(str32[c]));
313 if ((prev_upper && cur_lower) || (prev_lower && cur_upper))
314 all_one_case =
false;
317 prev_upper = cur_upper;
318 prev_lower = cur_lower;
321 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