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

Function TitlecaseString

tensorflow/core/platform/str_util.cc:121–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119string Uppercase(StringPiece s) { return absl::AsciiStrToUpper(s); }
120
121void TitlecaseString(string* s, StringPiece delimiters) {
122 bool upper = true;
123 for (string::iterator ss = s->begin(); ss != s->end(); ++ss) {
124 if (upper) {
125 *ss = toupper(*ss);
126 }
127 upper = (delimiters.find(*ss) != StringPiece::npos);
128 }
129}
130
131string StringReplace(StringPiece s, StringPiece oldsub, StringPiece newsub,
132 bool replace_all) {

Callers 2

TESTFunction · 0.85
ToTitleFunction · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by 1

TESTFunction · 0.68