MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / hasBeginning

Function hasBeginning

Source/Utility/strings.cpp:190–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190bool hasBeginning(const string& fullString, const string& beginning) {
191 if (fullString.length() >= beginning.length()) {
192 if (fullString.substr(0, beginning.length()) == beginning) {
193 return true;
194 }
195 }
196 return false;
197}
198
199bool hasEnding(string const& fullString, string const& ending) {
200 if (fullString.length() >= ending.length()) {

Callers 2

ScriptableUICallbackMethod · 0.85
ClearCacheFunction · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected