MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / strLTrim

Function strLTrim

Source/3rdParty/bx/src/string.cpp:464–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462 }
463
464 StringView strLTrim(const StringView& _str, const StringView& _chars)
465 {
466 const char* ptr = _str.getPtr();
467 const char* chars = _chars.getPtr();
468 const uint32_t charsLen = _chars.getLength();
469
470 for (uint32_t ii = 0, len = _str.getLength(); ii < len; ++ii)
471 {
472 if (NULL == strFindUnsafe(chars, charsLen, ptr[ii]) )
473 {
474 return StringView(ptr + ii, len-ii);
475 }
476 }
477
478 return StringView(_str.getTerm(), _str.getTerm() );
479 }
480
481 StringView strLTrimSpace(const StringView& _str)
482 {

Callers 1

strTrimFunction · 0.85

Calls 3

strFindUnsafeFunction · 0.85
StringViewClass · 0.50
getLengthMethod · 0.45

Tested by

no test coverage detected