MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / string_format

Function string_format

core/pdcodegen/src/pdcodegen.cpp:59–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58}
59void string_format(std::string& source) { // NOLINT
60 size_t len = source.length();
61 std::string sep = "_";
62 for (int i = 0; i < len; i++) {
63 if (source[i] >= 'A' && source[i] <= 'Z') {
64 source[i] += 32;
65 if (i == 0) {
66 continue;
67 }
68 source.insert(i, sep);
69 i++;
70 len++;
71 }
72 }
73}
74bool valid_service_method(const std::vector<const MethodDescriptor*>& methods) {
75 if (methods.size() != 2) {
76 return false;

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected