Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

string_util.h File Reference


Detailed Description

Describes some useful functions for string manipulation in the string_util namespace.

Author:
ejt (Creator)
Author
ejt
Name
tekkotsu-4_0
Revision
1.10
State
Exp
Date
2007/11/09 19:01:14

Definition in file string_util.h.

#include "attributes.h"
#include <string>
#include <vector>

Include dependency graph for string_util.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  string_util

Functions

char string_util::localeToUpper (char c)
 uses the standard library's "locale" to convert case of a single character
char string_util::localeToLower (char c)
 uses the standard library's "locale" to convert case of a single character
string string_util::makeLower (const std::string &s) ATTR_must_check
 returns lower case version of s
string string_util::makeUpper (const std::string &s) ATTR_must_check
 returns upper case version of s
string string_util::removePrefix (const std::string &str, const std::string &pre) ATTR_must_check
 returns str with pre removed - if pre is not fully matched, str is returned unchanged
string string_util::trim (const std::string &str) ATTR_must_check
 removes whitespace (as defined by isspace()) from the beginning and end of str, and returns the result
bool string_util::parseArgs (const std::string &input, std::vector< std::string > &args, std::vector< unsigned int > &offsets)
 parses the input string into an arg list, with corresponding offsets of each arg in the original input
string string_util::tildeExpansion (const std::string &str) ATTR_must_check
 replaces ~USER prefix with specified user's home directory, or ~ prefix with current HOME environment setting; returns str if no valid expansion is found
bool string_util::reMatch (const std::string &str, const std::string &regex)
 returns true if str matches re (assumes 'extended' regular expression, not 'basic'), false otherwise and throws std::string message on error
bool string_util::reMatch (const std::string &str, const std::string &regex, int flags)
 returns true if str matches re (with optional flags to control interpretation), false otherwise and throws std::string message on error


Tekkotsu v4.0
Generated Thu Nov 22 00:57:31 2007 by Doxygen 1.5.4