From b7d4e305ec05f9816d3990bdf6ab579401176837 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 28 Feb 2004 10:46:02 +0000 Subject: fixed bug in removeTrailingWhitespace, patch from Mathias Gumz --- src/FbTk/StringUtil.cc | 4 ++-- 1 file 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: StringUtil.cc,v 1.9 2003/12/16 17:06:52 fluxgen Exp $ +// $Id: StringUtil.cc,v 1.10 2004/02/28 10:46:02 fluxgen Exp $ #include "StringUtil.hh" @@ -188,7 +188,7 @@ string::size_type removeFirstWhitespace(std::string &str) { string::size_type removeTrailingWhitespace(std::string &str) { // strip trailing whitespace - string::size_type first_pos = str.find_first_not_of(" \t"); + string::size_type first_pos = str.find_last_not_of(" \t"); if (first_pos != string::npos) { string::size_type last_pos = str.find_first_of(" \t", first_pos); while (last_pos != string::npos) { -- cgit v0.11.2