Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10131: [string_algo] trim_all_*() functions leaves a single asterisk in the string.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-26 22:01:46
#10131: [string_algo] trim_all_*() functions leaves a single asterisk in the
string.
-------------------------------+-------------------------
Reporter: wburkhardt@⦠| Owner: marshall
Type: Bugs | Status: assigned
Milestone: To Be Determined | Component: string_algo
Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-------------------------
Comment (by steven_watanabe):
This is definitely not a bug. The function is behaving exactly as
expected. From the documentation, "trim_all removes all trailing and
leading spaces from a sequence (string). In addition, spaces in the
middle of the sequence are truncated to just one character." In this
case, you're defining "whitespace" to be a set of characters. It sounds
like the function that you really want is std::remove_copy_if.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10131#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC