diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2009-10-01 19:16:46 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2009-10-01 19:16:46 (GMT) |
commit | 261ba26d27c3a64a627b6f407e057da0d17b621c (patch) | |
tree | c01a497e688192e0a2049f7181b4cbb3f93fa0da /src/FbTk/StringUtil.hh | |
parent | 57b6e5a778d597aa279ac72aac38a3b178221931 (diff) | |
download | fluxbox_pavel-261ba26d27c3a64a627b6f407e057da0d17b621c.zip fluxbox_pavel-261ba26d27c3a64a627b6f407e057da0d17b621c.tar.bz2 |
another little helper for FbTk::StringUtil: extractNumber()
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 6493f74..7bc8f80 100644 --- a/src/FbTk/StringUtil.hh +++ b/src/FbTk/StringUtil.hh | |||
@@ -30,6 +30,14 @@ 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 | |||
33 | /// creates a number to a string | 41 | /// creates a number to a string |
34 | std::string number2String(int num); | 42 | std::string number2String(int num); |
35 | 43 | ||