diff options
author | Jim Ramsay <i.am@jimramsay.com> | 2009-10-14 01:05:49 (GMT) |
---|---|---|
committer | Jim Ramsay <i.am@jimramsay.com> | 2009-10-14 01:05:49 (GMT) |
commit | 839ea523164caecd8c779e60539b78c2a748a81f (patch) | |
tree | 0019d04f27a1a258bc7a900e3cf77b916dca6493 /src/FbTk/StringUtil.hh | |
parent | 4d3aa646c1d1d1de4fdb31f938f6ea62fd5dd21e (diff) | |
parent | 8def80cec337a986b762cdbb5e2555c6da809353 (diff) | |
download | fluxbox_lack-839ea523164caecd8c779e60539b78c2a748a81f.zip fluxbox_lack-839ea523164caecd8c779e60539b78c2a748a81f.tar.bz2 |
Merge branch 'master' into argbtesting/argbargb
Conflicts:
src/FbTk/FbWindow.cc
Diffstat (limited to 'src/FbTk/StringUtil.hh')
-rw-r--r-- | src/FbTk/StringUtil.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh index 75fa69e..7bc8f80 100644 --- a/src/FbTk/StringUtil.hh +++ b/src/FbTk/StringUtil.hh | |||
@@ -30,6 +30,16 @@ namespace FbTk { | |||
30 | 30 | ||
31 | namespace StringUtil { | 31 | namespace StringUtil { |
32 | 32 | ||
33 | /// \@{ | ||
34 | /// @param in - input string, might be 0xab or 0123 | ||
35 | /// @param out - result if extraction was ok | ||
36 | /// @return 1 - ok, result stored in 'out' | ||
37 | int extractNumber(const std::string& in, unsigned int& out); | ||
38 | int extractNumber(const std::string& in, int& out); | ||
39 | /// \@} | ||
40 | |||
41 | /// creates a number to a string | ||
42 | std::string number2String(int num); | ||
33 | 43 | ||
34 | /// Similar to `strstr' but this function ignores the case of both strings | 44 | /// Similar to `strstr' but this function ignores the case of both strings |
35 | const char *strcasestr(const char *str, const char *ptn); | 45 | const char *strcasestr(const char *str, const char *ptn); |
@@ -84,7 +94,7 @@ static void stringTokensBetween(Container &container, const std::string &in, | |||
84 | while (true) { | 94 | while (true) { |
85 | err = getStringBetween(token, in.c_str() + pos, first, last, ok_chars, | 95 | err = getStringBetween(token, in.c_str() + pos, first, last, ok_chars, |
86 | allow_nesting); | 96 | allow_nesting); |
87 | if (err == 0) | 97 | if (err <= 0) |
88 | break; | 98 | break; |
89 | container.push_back(token); | 99 | container.push_back(token); |
90 | pos += err; | 100 | pos += err; |