MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / gen_field_name

Method gen_field_name

tl/generate/tl_writer_java.cpp:119–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119std::string TD_TL_writer_java::gen_field_name(std::string name) const {
120 assert(name.size() > 0);
121 assert(is_alnum(name.back()));
122
123 bool next_to_upper = false;
124 std::string result;
125 for (std::size_t i = 0; i < name.size(); i++) {
126 if (!is_alnum(name[i])) {
127 next_to_upper = true;
128 continue;
129 }
130 if (next_to_upper) {
131 result += to_upper(name[i]);
132 next_to_upper = false;
133 } else {
134 result += name[i];
135 }
136 }
137 return result;
138}
139
140std::string TD_TL_writer_java::gen_var_name(const tl::var_description &desc) const {
141 assert(false);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected