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

Function strRTrim

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

Source from the content-addressed store, hash-verified

505 }
506
507 StringView strRTrim(const StringView& _str, const StringView& _chars)
508 {
509 if (!_str.isEmpty() )
510 {
511 const char* ptr = _str.getPtr();
512 const char* chars = _chars.getPtr();
513 const uint32_t charsLen = _chars.getLength();
514
515 for (int32_t len = _str.getLength(), ii = len - 1; 0 <= ii; --ii)
516 {
517 if (NULL == strFindUnsafe(chars, charsLen, ptr[ii]))
518 {
519 return StringView(ptr, ii + 1);
520 }
521 }
522
523 return StringView(_str.getPtr(), _str.getPtr());
524 }
525
526 return _str;
527 }
528
529 StringView strRTrimSpace(const StringView& _str)
530 {

Callers 3

parseInOutFunction · 0.85
makeAllFunction · 0.85
strTrimFunction · 0.85

Calls 4

strFindUnsafeFunction · 0.85
StringViewClass · 0.50
isEmptyMethod · 0.45
getLengthMethod · 0.45

Tested by

no test coverage detected