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

Function strRTrimSpace

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

Source from the content-addressed store, hash-verified

527 }
528
529 StringView strRTrimSpace(const StringView& _str)
530 {
531 if (!_str.isEmpty() )
532 {
533 const char* ptr = _str.getPtr();
534
535 for (int32_t len = _str.getLength(), ii = len - 1; 0 <= ii; --ii)
536 {
537 if (!isSpace(ptr[ii]) )
538 {
539 return StringView(ptr, ii + 1);
540 }
541 }
542
543 return StringView(_str.getPtr(), _str.getPtr());
544 }
545
546 return _str;
547 }
548
549 StringView strTrim(const StringView& _str, const StringView& _chars)
550 {

Callers 1

strTrimSpaceFunction · 0.85

Calls 4

isSpaceFunction · 0.70
StringViewClass · 0.50
isEmptyMethod · 0.45
getLengthMethod · 0.45

Tested by

no test coverage detected