MCPcopy Create free account
hub / github.com/davisking/dlib / rtrim

Function rtrim

dlib/string/string.h:623–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621 typename alloc
622 >
623 const std::basic_string<charT,traits,alloc> rtrim (
624 const std::basic_string<charT,traits,alloc>& str,
625 const std::basic_string<charT,traits,alloc>& trim_chars
626 )
627 {
628 typedef std::basic_string<charT,traits,alloc> string;
629
630 typename string::size_type pos = str.find_last_not_of(trim_chars);
631 if (pos != string::npos)
632 return str.substr(0,pos+1);
633 else
634 return std::basic_string<charT,traits,alloc>();
635 }
636
637 template <
638 typename charT,

Callers 1

string_testFunction · 0.85

Calls

no outgoing calls

Tested by 1

string_testFunction · 0.68