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

Function trim

src/common/string_utils.h:147–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145} // namespace detail
146
147template <typename CharType> std::basic_string_view<CharType> trim(std::basic_string_view<CharType> sv) {
148 while (detail::is_space_helper(sv.front()))
149 sv.remove_prefix(1);
150 while (detail::is_space_helper(sv.back()))
151 sv.remove_suffix(1);
152 return sv;
153}
154
155// trim from start (in place)
156void ltrim_inplace(std::wstring &s);

Callers

nothing calls this directly

Calls 1

is_space_helperFunction · 0.85

Tested by

no test coverage detected