MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / beginsWith

Method beginsWith

source/core/StarString.cpp:243–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243bool String::beginsWith(String const& beg, CaseSensitivity cs) const {
244 auto begSize = beg.size();
245 if (begSize == 0)
246 return true;
247
248 auto mysize = size();
249 if (begSize > mysize)
250 return false;
251
252 return compare(0, begSize, beg, 0, NPos, cs) == 0;
253}
254
255bool String::beginsWith(Char beg, CaseSensitivity cs) const {
256 if (size() == 0)

Callers 15

replaceBehaviorTagFunction · 0.45
replaceOutputBehaviorTagFunction · 0.45
parseWarpActionFunction · 0.45
inviteMethod · 0.45
handleCommandMethod · 0.45
scanForAssetSourcesMethod · 0.45
sendChatMethod · 0.45
buildLayerMethod · 0.45
playerCidFromCommandMethod · 0.45
ArmorItemMethod · 0.45

Calls 3

sizeFunction · 0.85
compareFunction · 0.85
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.36