all repos — fluxbox @ 2fe21974f404134c8128e032838bbd761590256e

custom fork of the fluxbox windowmanager

toLower
fluxgen fluxgen
commit

2fe21974f404134c8128e032838bbd761590256e

parent

435fc7c1ccb8ac965beb01e80070e9b1aa5976be

2 files changed, 9 insertions(+), 2 deletions(-)

jump to
M src/StringUtil.ccsrc/StringUtil.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: StringUtil.cc,v 1.11 2002/08/14 22:43:30 fluxgen Exp $ +// $Id: StringUtil.cc,v 1.12 2002/09/15 09:40:51 fluxgen Exp $ #include "StringUtil.hh"

@@ -131,6 +131,11 @@

out = in.substr(i+1, j-i-1); //copy the string between first and last //return value to last character return (j+1+total_add); +} + +void toLower(char * const conv) { + for (int byte_pos = 0; byte_pos < strlen(conv); ++byte_pos) + conv[byte_pos] = tolower(conv[byte_pos]); } }; //end namespace StringUtil
M src/StringUtil.hhsrc/StringUtil.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: StringUtil.hh,v 1.9 2002/08/14 22:43:30 fluxgen Exp $ +//$Id: StringUtil.hh,v 1.10 2002/09/15 09:40:26 fluxgen Exp $ #ifndef STRINGUTIL_HH #define STRINGUTIL_HH

@@ -37,6 +37,8 @@

std::string expandFilename(const std::string &filename); int getStringBetween(std::string& out, const char *instr, const char first, const char last, const char *ok_chars=" \t\n"); + +void toLower(char * const conv); //--------- stringtok ---------------------------------- // Breaks a string into tokens