25 char* demangledChars = abi::__cxa_demangle(aMangledString.c_str(), 0, 0, &demanglingStatus);
26 std::string demangledName = demangledChars;
34 static const char* elimStrings[] = {
50 static const char* wrapStrings[] = {
69 std::string retString = aInStr;
72 while (elimStrings[elimStrIt] != NULL)
74 std::string::size_type i = retString.find(elimStrings[elimStrIt]);
76 if (i != std::string::npos)
78 retString.erase(i, strlen(elimStrings[elimStrIt]));
92 std::string retString = aInStr;
95 while (wrapStrings[wrapStrIt] != NULL)
97 std::string::size_type wrapPos = retString.rfind(wrapStrings[wrapStrIt]);
99 if (wrapPos != std::string::npos && wrapPos != 0)
101 retString.insert(wrapPos,
"\\n");
std::string GetDemangledName(const std::string &aMangledString)
Provides utilities for manipulating DetectorGraph node names.
std::string WrapOnCommonEndings(const std::string &aNodeName)
Adds a \n to the input name before common suffixes.
std::string WrapOnSubStrings(const std::string &aInStr, const char *wrapStrings[])
Adds a \n to aInStr before each sub-string in wrapStrings.
std::string RemoveSubstrings(const std::string &aInStr, const char *elimStrings[])
Removes all elimStrings from aInStr and returns new string.
std::string GetMinimalName(const std::string &aMangledString)
Returns a readable name with redundant prefixes/suffixes removed.