X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Flstrings.h;h=9130f687c8b1c564faaa38c5d6c7c5eef929fdb0;hb=741bd1221aa56a6e278d6f8280a0dd7e2e901cac;hp=01f72383ae8a2c9eacdd0adb8ad89dded7f97770;hpb=1d0bac11443d018a3bd86acd21b649aefc37f77b;p=features.git diff --git a/src/support/lstrings.h b/src/support/lstrings.h index 01f72383ae..9130f687c8 100644 --- a/src/support/lstrings.h +++ b/src/support/lstrings.h @@ -103,8 +103,9 @@ bool prefixIs(docstring const & str, docstring const & pre); bool suffixIs(std::string const &, char); bool suffixIs(docstring const &, char_type); -/// Does the std::string end with this suffix? +/// Does the string end with this suffix? bool suffixIs(std::string const &, std::string const &); +bool suffixIs(docstring const &, docstring const &); /// inline bool contains(std::string const & a, std::string const & b) @@ -183,9 +184,10 @@ docstring const trim(docstring const & a, char const * p = " "); */ std::string const trim(std::string const & a, char const * p = " "); -/** Trims characters off the end of a string. +/** Trims characters off the end of a string, removing any character + in p. \code - rtrim("abccc", "c") == "ab". + rtrim("abcde", "dec") == "ab". \endcode */ std::string const rtrim(std::string const & a, char const * p = " "); @@ -193,7 +195,7 @@ docstring const rtrim(docstring const & a, char const * p = " "); /** Trims characters off the beginning of a string. \code - ("ababcdef", "ab") = "cdef" + ("abbabcdef", "ab") = "cdef" \endcode */ std::string const ltrim(std::string const & a, char const * p = " ");