diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 09:19:33 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 09:19:33 (GMT) |
commit | 8e96ffb74b98b08ac35dcd1c861421c65a55cbe6 (patch) | |
tree | 6c2da67d383d126892708ced362b569af9178db4 /src/FbTk/StringUtil.hh | |
parent | 0f6b73f36abb1fd31893ef16413f010e78ed84ab (diff) | |
download | fluxbox-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.hh | 8 |
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 | |||
29 | namespace FbTk { | 31 | namespace FbTk { |
30 | 32 | ||
31 | namespace StringUtil { | 33 | namespace 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 |
68 | void getFirstWord(const std::string &in, std::string &first, std::string &rest); | 70 | void getFirstWord(const std::string &in, std::string &first, std::string &rest); |
69 | 71 | ||
72 | template <typename T> | ||
73 | void fromString(const char *in, T &out) { | ||
74 | FbTk_istringstream iss(in); | ||
75 | iss >> out; | ||
76 | } | ||
77 | |||
70 | template <typename Container> | 78 | template <typename Container> |
71 | static void stringTokensBetween(Container &container, const std::string &in, | 79 | static void stringTokensBetween(Container &container, const std::string &in, |
72 | std::string &rest, char first, char last, | 80 | std::string &rest, char first, char last, |