diff options
author | fluxgen <fluxgen> | 2004-02-28 10:46:02 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-02-28 10:46:02 (GMT) |
commit | b7d4e305ec05f9816d3990bdf6ab579401176837 (patch) | |
tree | efd7a41508e1b0763d5b8f289ea061f6af0f1a1e /src | |
parent | 1d39180d031f8c3c190543394164af931db5b5aa (diff) | |
download | fluxbox_lack-b7d4e305ec05f9816d3990bdf6ab579401176837.zip fluxbox_lack-b7d4e305ec05f9816d3990bdf6ab579401176837.tar.bz2 |
fixed bug in removeTrailingWhitespace, patch from Mathias Gumz
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/StringUtil.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc index 4d282ad..b83300d 100644 --- a/src/FbTk/StringUtil.cc +++ b/src/FbTk/StringUtil.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: StringUtil.cc,v 1.9 2003/12/16 17:06:52 fluxgen Exp $ | 22 | // $Id: StringUtil.cc,v 1.10 2004/02/28 10:46:02 fluxgen Exp $ |
23 | 23 | ||
24 | #include "StringUtil.hh" | 24 | #include "StringUtil.hh" |
25 | 25 | ||
@@ -188,7 +188,7 @@ string::size_type removeFirstWhitespace(std::string &str) { | |||
188 | 188 | ||
189 | string::size_type removeTrailingWhitespace(std::string &str) { | 189 | string::size_type removeTrailingWhitespace(std::string &str) { |
190 | // strip trailing whitespace | 190 | // strip trailing whitespace |
191 | string::size_type first_pos = str.find_first_not_of(" \t"); | 191 | string::size_type first_pos = str.find_last_not_of(" \t"); |
192 | if (first_pos != string::npos) { | 192 | if (first_pos != string::npos) { |
193 | string::size_type last_pos = str.find_first_of(" \t", first_pos); | 193 | string::size_type last_pos = str.find_first_of(" \t", first_pos); |
194 | while (last_pos != string::npos) { | 194 | while (last_pos != string::npos) { |