MCPcopy Create free account
hub / github.com/beefytech/Beef / TrimEnd

Method TrimEnd

BeefySysLib/util/String.cpp:760–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758}
759
760void StringImpl::TrimEnd()
761{
762 auto ptr = GetPtr();
763 for (intptr i = mLength - 1; i >= 0; i--)
764 {
765 char c = ptr[i];
766 if (!iswspace(c))
767 {
768 if (i < mLength - 1)
769 RemoveToEnd(i + 1);
770 return;
771 }
772 }
773 Clear();
774}
775
776void StringImpl::TrimStart()
777{

Callers

nothing calls this directly

Calls 1

ClearFunction · 0.85

Tested by

no test coverage detected