]> git.lyx.org Git - features.git/blobdiff - src/support/lstrings.h
Fix for bug 5053. There are still some serious problems here, though, as (a) "unknown...
[features.git] / src / support / lstrings.h
index 01f72383ae8a2c9eacdd0adb8ad89dded7f97770..9130f687c8b1c564faaa38c5d6c7c5eef929fdb0 100644 (file)
@@ -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 = " ");