aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/StringUtil.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-28 09:19:33 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-28 09:19:33 (GMT)
commit8e96ffb74b98b08ac35dcd1c861421c65a55cbe6 (patch)
tree6c2da67d383d126892708ced362b569af9178db4 /src/FbTk/StringUtil.hh
parent0f6b73f36abb1fd31893ef16413f010e78ed84ab (diff)
downloadfluxbox-8e96ffb74b98b08ac35dcd1c861421c65a55cbe6.zip
fluxbox-8e96ffb74b98b08ac35dcd1c861421c65a55cbe6.tar.bz2
moved DelayedCmd from Screen.cc to FbTk/Timer.cc, added it to the keys file
Diffstat (limited to 'src/FbTk/StringUtil.hh')
-rw-r--r--src/FbTk/StringUtil.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh
index bca48bc..416db0d 100644
--- a/src/FbTk/StringUtil.hh
+++ b/src/FbTk/StringUtil.hh
@@ -26,6 +26,8 @@
26 26
27#include <string> 27#include <string>
28 28
29#include "stringstream.hh"
30
29namespace FbTk { 31namespace FbTk {
30 32
31namespace StringUtil { 33namespace StringUtil {
@@ -67,6 +69,12 @@ std::string::size_type removeTrailingWhitespace(std::string &str);
67/// splits input at first non-leading whitespace and returns both parts 69/// splits input at first non-leading whitespace and returns both parts
68void getFirstWord(const std::string &in, std::string &first, std::string &rest); 70void getFirstWord(const std::string &in, std::string &first, std::string &rest);
69 71
72template <typename T>
73void fromString(const char *in, T &out) {
74 FbTk_istringstream iss(in);
75 iss >> out;
76}
77
70template <typename Container> 78template <typename Container>
71static void stringTokensBetween(Container &container, const std::string &in, 79static void stringTokensBetween(Container &container, const std::string &in,
72 std::string &rest, char first, char last, 80 std::string &rest, char first, char last,