MCPcopy Create free account
hub / github.com/cuberite/cuberite / StripColorCodes

Function StripColorCodes

src/StringUtils.cpp:624–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622
623
624AString StripColorCodes(const AString & a_Message)
625{
626 AString res(a_Message);
627 size_t idx = 0;
628 for (;;)
629 {
630 idx = res.find("\xc2\xa7", idx);
631 if (idx == AString::npos)
632 {
633 return res;
634 }
635 res.erase(idx, 3);
636 }
637}
638
639
640

Callers 2

KickMethod · 0.85
SendDisconnectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected