MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / ltrim_inplace

Function ltrim_inplace

src/common/string_utils.cpp:27–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25void to_upper_inplace(std::wstring &s) { std::transform(s.begin(), s.end(), s.begin(), &towupper); }
26
27void ltrim_inplace(std::wstring &s) {
28 s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](wchar_t ch) {
29 return iswspace(ch) == FALSE;
30 }));
31}
32
33void rtrim_inplace(std::wstring &s) {
34 s.erase(std::find_if(s.rbegin(), s.rend(), [](wchar_t ch) {

Callers 1

trim_inplaceFunction · 0.85

Calls 3

eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected