MCPcopy Create free account
hub / github.com/comaps/comaps / stripAtSymbol

Function stripAtSymbol

libs/indexer/validate_and_format_contacts.cpp:256–265  ·  view source on GitHub ↗

Strip '%40' and `@` chars from string start if they exist.

Source from the content-addressed store, hash-verified

254
255// Strip '%40' and `@` chars from string start if they exist.
256string stripAtSymbol(string const & inputString)
257{
258 if (inputString.empty())
259 return inputString;
260 if (inputString.front() == '@')
261 return inputString.substr(1);
262 if (inputString.starts_with("%40"))
263 return inputString.substr(3);
264 return inputString;
265}
266
267string ValidateAndFormat_contactLine(string const & linePage)
268{

Callers 5

ValidateLinePageFunction · 0.85
ValidateFediversePageFunction · 0.85

Calls 2

frontMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected