#include <OgreString.h>
Public Types | |
typedef std::ostringstream | StrStreamType |
Static Public Member Functions | |
static void | trim (String &str, bool left=true, bool right=true) |
Removes any whitespace characters, be it standard space or TABs and so on. | |
static std::vector< String > | split (const String &str, const String &delims="\t\n ", unsigned int maxSplits=0) |
Returns a StringVector that contains all the substrings delimited by the characters in the passed delims argument. | |
static void | toLowerCase (String &str) |
Upper-cases all the characters in the string. | |
static void | toUpperCase (String &str) |
Lower-cases all the characters in the string. | |
static bool | startsWith (const String &str, const String &pattern, bool lowerCase=true) |
Returns whether the string begins with the pattern passed in. | |
static bool | endsWith (const String &str, const String &pattern, bool lowerCase=true) |
Returns whether the string ends with the pattern passed in. | |
static String | standardisePath (const String &init) |
Method for standardising paths - use forward slashes only, end with slash. | |
static void | splitFilename (const String &qualifiedName, String &outBasename, String &outPath) |
Method for splitting a fully qualified filename into the base name and path. | |
static void | splitFullFilename (const Ogre::String &qualifiedName, Ogre::String &outBasename, Ogre::String &outExtention, Ogre::String &outPath) |
Method for splitting a fully qualified filename into the base name, extension and path. | |
static void | splitBaseFilename (const Ogre::String &fullName, Ogre::String &outBasename, Ogre::String &outExtention) |
Method for splitting a filename into the base name and extension. | |
static bool | match (const String &str, const String &pattern, bool caseSensitive=true) |
Simple pattern-matching routine allowing a wildcard pattern. | |
Static Public Attributes | |
static const String | BLANK |
Constant blank string, useful for returning by ref where local does not exist. |
Definition at line 69 of file OgreString.h.
typedef std::ostringstream Ogre::StringUtil::StrStreamType |
Definition at line 72 of file OgreString.h.
static void Ogre::StringUtil::trim | ( | String & | str, | |
bool | left = true , |
|||
bool | right = true | |||
) | [static] |
Removes any whitespace characters, be it standard space or TABs and so on.
static std::vector< String > Ogre::StringUtil::split | ( | const String & | str, | |
const String & | delims = "\t\n " , |
|||
unsigned int | maxSplits = 0 | |||
) | [static] |
Returns a StringVector that contains all the substrings delimited by the characters in the passed delims
argument.
delims | A list of delimiter characters to split by | |
maxSplits | The maximum number of splits to perform (0 for unlimited splits). If this parameters is > 0, the splitting process will stop after this many splits, left to right. |
Referenced by Ogre::DriverVersion::fromString().
static void Ogre::StringUtil::toLowerCase | ( | String & | str | ) | [static] |
Upper-cases all the characters in the string.
static void Ogre::StringUtil::toUpperCase | ( | String & | str | ) | [static] |
Lower-cases all the characters in the string.
static bool Ogre::StringUtil::startsWith | ( | const String & | str, | |
const String & | pattern, | |||
bool | lowerCase = true | |||
) | [static] |
Returns whether the string begins with the pattern passed in.
pattern | The pattern to compare with. | |
lowerCase | If true, the end of the string will be lower cased before comparison, pattern should also be in lower case. |
static bool Ogre::StringUtil::endsWith | ( | const String & | str, | |
const String & | pattern, | |||
bool | lowerCase = true | |||
) | [static] |
Returns whether the string ends with the pattern passed in.
pattern | The pattern to compare with. | |
lowerCase | If true, the end of the string will be lower cased before comparison, pattern should also be in lower case. |
Method for standardising paths - use forward slashes only, end with slash.
static void Ogre::StringUtil::splitFilename | ( | const String & | qualifiedName, | |
String & | outBasename, | |||
String & | outPath | |||
) | [static] |
Method for splitting a fully qualified filename into the base name and path.
static void Ogre::StringUtil::splitFullFilename | ( | const Ogre::String & | qualifiedName, | |
Ogre::String & | outBasename, | |||
Ogre::String & | outExtention, | |||
Ogre::String & | outPath | |||
) | [static] |
Method for splitting a fully qualified filename into the base name, extension and path.
static void Ogre::StringUtil::splitBaseFilename | ( | const Ogre::String & | fullName, | |
Ogre::String & | outBasename, | |||
Ogre::String & | outExtention | |||
) | [static] |
Method for splitting a filename into the base name and extension.
static bool Ogre::StringUtil::match | ( | const String & | str, | |
const String & | pattern, | |||
bool | caseSensitive = true | |||
) | [static] |
Simple pattern-matching routine allowing a wildcard pattern.
str | String to test | |
pattern | Pattern to match against; can include simple '*' wildcards | |
caseSensitive | Whether the match is case sensitive or not |
const String Ogre::StringUtil::BLANK [static] |
Constant blank string, useful for returning by ref where local does not exist.
Definition at line 156 of file OgreString.h.
Referenced by Ogre::AnimableObject::getAnimableDictionaryName(), and Ogre::Log::Stream::operator<<().
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 27 22:07:38 2009