diff options
author | fluxgen <fluxgen> | 2002-09-15 09:40:51 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-09-15 09:40:51 (GMT) |
commit | 2fe21974f404134c8128e032838bbd761590256e (patch) | |
tree | 28dc35936df258cef1c1fd35be490fdcd4de0cdf /src | |
parent | 435fc7c1ccb8ac965beb01e80070e9b1aa5976be (diff) | |
download | fluxbox_pavel-2fe21974f404134c8128e032838bbd761590256e.zip fluxbox_pavel-2fe21974f404134c8128e032838bbd761590256e.tar.bz2 |
toLower
Diffstat (limited to 'src')
-rw-r--r-- | src/StringUtil.cc | 7 | ||||
-rw-r--r-- | src/StringUtil.hh | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/StringUtil.cc b/src/StringUtil.cc index 1a9e7f1..d37446a 100644 --- a/src/StringUtil.cc +++ b/src/StringUtil.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: StringUtil.cc,v 1.11 2002/08/14 22:43:30 fluxgen Exp $ | 22 | // $Id: StringUtil.cc,v 1.12 2002/09/15 09:40:51 fluxgen Exp $ |
23 | 23 | ||
24 | #include "StringUtil.hh" | 24 | #include "StringUtil.hh" |
25 | 25 | ||
@@ -133,4 +133,9 @@ int getStringBetween(std::string& out, const char *instr, const char first, cons | |||
133 | return (j+1+total_add); | 133 | return (j+1+total_add); |
134 | } | 134 | } |
135 | 135 | ||
136 | void toLower(char * const conv) { | ||
137 | for (int byte_pos = 0; byte_pos < strlen(conv); ++byte_pos) | ||
138 | conv[byte_pos] = tolower(conv[byte_pos]); | ||
139 | } | ||
140 | |||
136 | }; //end namespace StringUtil | 141 | }; //end namespace StringUtil |
diff --git a/src/StringUtil.hh b/src/StringUtil.hh index f2f4944..a77dbf0 100644 --- a/src/StringUtil.hh +++ b/src/StringUtil.hh | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | //$Id: StringUtil.hh,v 1.9 2002/08/14 22:43:30 fluxgen Exp $ | 22 | //$Id: StringUtil.hh,v 1.10 2002/09/15 09:40:26 fluxgen Exp $ |
23 | 23 | ||
24 | #ifndef STRINGUTIL_HH | 24 | #ifndef STRINGUTIL_HH |
25 | #define STRINGUTIL_HH | 25 | #define STRINGUTIL_HH |
@@ -38,6 +38,8 @@ std::string expandFilename(const std::string &filename); | |||
38 | int getStringBetween(std::string& out, const char *instr, const char first, const char last, | 38 | int getStringBetween(std::string& out, const char *instr, const char first, const char last, |
39 | const char *ok_chars=" \t\n"); | 39 | const char *ok_chars=" \t\n"); |
40 | 40 | ||
41 | void toLower(char * const conv); | ||
42 | |||
41 | //--------- stringtok ---------------------------------- | 43 | //--------- stringtok ---------------------------------- |
42 | // Breaks a string into tokens | 44 | // Breaks a string into tokens |
43 | //-------------------------------------------------- | 45 | //-------------------------------------------------- |