MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getStringRange

Function getStringRange

plugins/plugin_utils/plugin_utils.cpp:453–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453std::string getStringRange(const std::string& find, size_t start, size_t end) {
454 std::string ret;
455
456 if (end <= start || start > find.size() || end > find.size()) {
457 return ret;
458 }
459
460 for (size_t p = start; p <= end; p++) {
461 ret += find[p];
462 }
463
464 return ret;
465}
466
467
468void trimLeadingWhitespace(std::string& text) {

Callers 1

getTemplateMetaDataMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected