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

Method extract

source/core/StarString.cpp:369–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369String String::extract(String const& chars) {
370 StringList l = splitAny(chars, 1);
371 if (l.size() == 0) {
372 return String();
373 } else if (l.size() == 1) {
374 clear();
375 return l.at(0);
376 } else {
377 *this = l.at(1);
378 return l.at(0);
379 }
380}
381
382String String::rextract(String const& chars) {
383 if (empty())

Callers 7

handleCommandMethod · 0.80
adminCommandMethod · 0.80
updateImagePreviewMethod · 0.80
handleCommandMethod · 0.80
connectToPeerMethod · 0.80
addPendingJoinMethod · 0.80
handleCommandMethod · 0.80

Calls 3

StringClass · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected