MCPcopy Create free account
hub / github.com/HumbleNet/HumbleNet / varSafeName

Function varSafeName

src/api_builder/build_include.cpp:7–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <fstream>
6
7std::string varSafeName(const std::string& name) {
8 std::string ret = name;
9
10 auto pos = ret.rfind('/');
11
12 if (pos != ret.npos) {
13 ret = ret.substr(pos + 1);
14 }
15
16 pos = ret.find('.');
17 if (pos != ret.npos) {
18 ret = ret.substr(0, pos);
19 }
20
21 return ret;
22}
23
24static char hexdigit[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
25

Callers 1

buildIncludeFunction · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected