MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ToCamelCase

Function ToCamelCase

tensorflow/cc/framework/cc_op_gen.cc:289–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289string ToCamelCase(const string& str) {
290 string result;
291 const char joiner = '_';
292 size_t i = 0;
293 bool cap = true;
294 while (i < str.size()) {
295 const char c = str[i++];
296 if (c == joiner) {
297 cap = true;
298 } else if (cap) {
299 result += toupper(c);
300 cap = false;
301 } else {
302 result += c;
303 }
304 }
305 return result;
306}
307
308// Returns a <string, bool> pair. The string is the C++ type name to be used for
309// attr_type when defining an object of that type. The bool is a flag to

Callers 2

GetOpAttrStructMethod · 0.85
WriteClassDeclMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected