TrueReality  v0.1.1912
StringUtils.cpp File Reference
#include <trUtil/StringUtils.h>
#include <trUtil/Logging/Log.h>
#include <trUtil/PlatformMacros.h>
#include <iomanip>
#include <strings.h>
Include dependency graph for StringUtils.cpp:

Go to the source code of this file.

Namespaces

 trUtil::StringUtils
 

Macros

#define strCmp   strcasecmp
 

Functions

TR_UTIL_EXPORT const std::string & trUtil::StringUtils::Trim (std::string &toTrim)
 Trims whitespace off the front and end of a string. More...
 
TR_UTIL_EXPORT int trUtil::StringUtils::StrCompare (const std::string &one, const std::string &two, bool caseSensitive=true)
 Compares strings like strcmp or stricmp or strcasecmp. More...
 
TR_UTIL_EXPORT void trUtil::StringUtils::ToLowerCase (std::string &str)
 Converts the whole string to lower case. More...
 
TR_UTIL_EXPORT std::string trUtil::StringUtils::ToLowerCase (const std::string &str)
 Converts the whole string to lower case, slower version. More...
 
TR_UTIL_EXPORT void trUtil::StringUtils::ToUpperCase (std::string &str)
 Converts the whole string to upper case. More...
 
TR_UTIL_EXPORT std::string trUtil::StringUtils::ToUpperCase (const std::string &str)
 Converts the whole string to upper case, slower version. More...
 
template<>
bool trUtil::StringUtils::FromString< bool > (const std::string &u)
 Special exception for bool where things like "True", "TRUE", and "true" should be accepted. More...
 
static bool trUtil::StringUtils::Scan (const char *&wildCards, const char *&str)
 
static bool trUtil::StringUtils::WildMatch (const char *wildCards, const char *str)
 
bool TR_UTIL_EXPORT trUtil::StringUtils::Match (const char *wildCards, const char *str)
 Matches. More...
 
void TR_UTIL_EXPORT trUtil::StringUtils::MakeIndexString (unsigned index, std::string &toFill, unsigned paddedLength=4)
 Makes index string. More...
 
bool TR_UTIL_EXPORT trUtil::StringUtils::TakeToken (std::string &data, std::string &outToken, char openChar, char closeChar)
 Reads the next token fromm the given string data. More...
 
void TR_UTIL_EXPORT trUtil::StringUtils::FindAndReplace (std::string &modifiedString, const std::string &findWhat, const std::string &replaceWith)
 Finds all instances of the findWhat string in the string modifiedString and replaces them with the replaceWith string. More...
 

Macro Definition Documentation

◆ strCmp

#define strCmp   strcasecmp

Definition at line 52 of file StringUtils.cpp.

Referenced by trUtil::StringUtils::StrCompare().