From 779220a03b4e07a38fe6f83ddb83e6a9b4b988b6 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 8 Sep 2007 15:15:31 +0000 Subject: [PATCH] Correct comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20141 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/lstrings.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/support/lstrings.h b/src/support/lstrings.h index 85e3cbc49a..d7a6a799e6 100644 --- a/src/support/lstrings.h +++ b/src/support/lstrings.h @@ -219,15 +219,18 @@ docstring const rtrim(docstring const & a, char const * p = " "); std::string const ltrim(std::string const & a, char const * p = " "); docstring const ltrim(docstring const & a, char const * p = " "); -/** Splits the string by the first delim. - Splits the string by the first appearance of delim. - The leading string up to delim is returned in piece (not including - delim), while the original string is cut from after the delimiter. - Example: +/** Splits the string given in the first argument at the first occurence + of the third argumnent, delim. + What precedes delim is returned in the second argument, piece; this + will be the whole of the string if no delimiter is found. + The return value is what follows delim, if anything. So the return + value is the null string if no delimiter is found. + Examples: \code - s1= ""; s2= "a;bc".split(s1, ';') -> s1 == "a"; s2 == "bc"; + s1= "a;bc"; s2= "" + ret = split(s1, s2, ';') -> ret = "bc", s2 == "a" \endcode -*/ + */ std::string const split(std::string const & a, std::string & piece, char delim); docstring const split(docstring const & a, docstring & piece, char_type delim); -- 2.39.2