MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / trim_prefix

Method trim_prefix

modules/gui/gui/src/backend/text_server/ustring.cpp:5052–5060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5050}
5051
5052String String::trim_prefix(const String& p_prefix) const
5053{
5054 String s = *this;
5055 if (s.begins_with(p_prefix))
5056 {
5057 return s.substr(p_prefix.length(), s.length() - p_prefix.length());
5058 }
5059 return s;
5060}
5061
5062String String::trim_suffix(const String& p_suffix) const
5063{

Callers

nothing calls this directly

Calls 3

begins_withMethod · 0.80
substrMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected