Lines Matching refs:name
62 C2String _C2EnumUtils::camelCaseToDashed(C2String name) { in camelCaseToDashed() argument
72 for (size_t ix = 0; ix < name.size(); ++ix) { in camelCaseToDashed()
73 C2_LOG(VERBOSE) << name.substr(0, word_start) << "|" in camelCaseToDashed()
74 << name.substr(word_start, ix - word_start) << "[" in camelCaseToDashed()
75 << name.substr(ix, 1) << "]" << name.substr(ix + 1) in camelCaseToDashed()
77 if (isupper(name[ix])) { in camelCaseToDashed()
79 name.insert(ix++, 1, '-'); in camelCaseToDashed()
82 name[ix] = tolower(name[ix]); in camelCaseToDashed()
84 } else if (islower(name[ix])) { in camelCaseToDashed()
86 name.insert(ix++, 1, '-'); in camelCaseToDashed()
89 name.insert(ix++ - 1, 1, '-'); in camelCaseToDashed()
93 } else if (isdigit(name[ix])) { in camelCaseToDashed()
95 name.insert(ix++, 1, '-'); in camelCaseToDashed()
99 } else if (name[ix] == '_') { in camelCaseToDashed()
101 name.erase(ix--, 1); in camelCaseToDashed()
103 name[ix] = '-'; in camelCaseToDashed()
111 name.resize(ix); in camelCaseToDashed()
114 C2_LOG(VERBOSE) << "=> " << name; in camelCaseToDashed()
115 return name; in camelCaseToDashed()