10 bool IsLower(
char ch) {
return 'a' <= ch && ch <=
'z'; }
11 bool IsUpper(
char ch) {
return 'A' <= ch && ch <=
'Z'; }
12 char ToLower(
char ch) {
return IsUpper(ch) ? ch +
'a' -
'A' : ch; }
17 std::transform(s.begin(), s.end(), s.begin(),
ToLower);
24 for(std::size_t i=0;i<str.size();i++)
44 bool firstcaps =
IsUpper(str[0]);
46 return firstcaps && (IsEntirely(rest,
IsLower) || IsEntirely(rest,
IsUpper));
66 if(!IsFlexibleCase(input))
69 for(
unsigned i=0;i<
sizeof(names)/
sizeof(names[0]);i++) {
70 if(names[i].truename == tolower(input)) {
75 if(names[i].falsename == tolower(input)) {
86 return input.empty() || input ==
"~" || input ==
"null" || input ==
"Null" || input ==
"NULL";
bool Convert(const std::string &input, std::string &output)