diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2009-10-01 06:57:31 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2009-10-01 06:57:31 (GMT) |
commit | c4c96ec830f7e22c5f5183886de1f399333f60cd (patch) | |
tree | 3ded4864f71f3f092697268ea879e73b8dc978e7 /src/FbTk | |
parent | 710ad1d4568239bbb1c19e82d764215b492d94db (diff) | |
download | fluxbox-c4c96ec830f7e22c5f5183886de1f399333f60cd.zip fluxbox-c4c96ec830f7e22c5f5183886de1f399333f60cd.tar.bz2 |
simpler code
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/StringUtil.cc | 7 | ||||
-rw-r--r-- | src/FbTk/StringUtil.hh | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc index 18e000e..a0e402d 100644 --- a/src/FbTk/StringUtil.cc +++ b/src/FbTk/StringUtil.cc | |||
@@ -60,6 +60,13 @@ namespace FbTk { | |||
60 | 60 | ||
61 | namespace StringUtil { | 61 | namespace StringUtil { |
62 | 62 | ||
63 | |||
64 | std::string number2String(int num) { | ||
65 | char s[128]; | ||
66 | sprintf(s, "%d", num); | ||
67 | return std::string(s); | ||
68 | } | ||
69 | |||
63 | /** | 70 | /** |
64 | Tries to find a string in another and | 71 | Tries to find a string in another and |
65 | ignoring the case of the characters | 72 | ignoring the case of the characters |
diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh index 35f23a2..6493f74 100644 --- a/src/FbTk/StringUtil.hh +++ b/src/FbTk/StringUtil.hh | |||
@@ -30,6 +30,8 @@ namespace FbTk { | |||
30 | 30 | ||
31 | namespace StringUtil { | 31 | namespace StringUtil { |
32 | 32 | ||
33 | /// creates a number to a string | ||
34 | std::string number2String(int num); | ||
33 | 35 | ||
34 | /// Similar to `strstr' but this function ignores the case of both strings | 36 | /// Similar to `strstr' but this function ignores the case of both strings |
35 | const char *strcasestr(const char *str, const char *ptn); | 37 | const char *strcasestr(const char *str, const char *ptn); |