aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/StringUtil.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-29 14:01:48 (GMT)
committerfluxgen <fluxgen>2003-09-29 14:01:48 (GMT)
commit75b3606424a27dafeb0958450bffa841ae463c2d (patch)
tree87c2521ee380565936c0f3268ac0388456e69d6b /src/FbTk/StringUtil.cc
parent71504b8bbe636bc49795ca3e94e78a70a2602542 (diff)
downloadfluxbox-75b3606424a27dafeb0958450bffa841ae463c2d.zip
fluxbox-75b3606424a27dafeb0958450bffa841ae463c2d.tar.bz2
added removeFirstWhitespace
Diffstat (limited to 'src/FbTk/StringUtil.cc')
-rw-r--r--src/FbTk/StringUtil.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc
index e1af2c2..934561f 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.6 2003/08/22 22:11:19 fluxgen Exp $ 22// $Id: StringUtil.cc,v 1.7 2003/09/29 14:01:48 fluxgen Exp $
23 23
24#include "StringUtil.hh" 24#include "StringUtil.hh"
25 25
@@ -178,6 +178,13 @@ std::string basename(const std::string &filename) {
178 return filename; 178 return filename;
179} 179}
180 180
181string::size_type removeFirstWhitespace(std::string &str) {
182 string::size_type first_pos = str.find_first_not_of(" \t");
183 if (first_pos != string::npos)
184 str.erase(0, first_pos);
185 return first_pos;
186}
187
181}; // end namespace StringUtil 188}; // end namespace StringUtil
182 189
183}; // end namespace FbTk 190}; // end namespace FbTk