Go to the documentation of this file.
35 #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
38 # if OGRE_COMP_VER >= 430
39 # include <tr1/unordered_map>
41 # include <ext/hash_map>
54 register size_t ret = 0;
55 for( Ogre::_StringBase::const_iterator it = _stringBase.begin(); it != _stringBase.end(); ++it )
87 static void trim(
String& str,
bool left =
true,
bool right =
true );
200 #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
201 # if OGRE_COMP_VER < 430
202 typedef ::__gnu_cxx::hash< _StringBase >
_StringHash;
204 typedef ::std::tr1::hash< _StringBase >
_StringHash;
206 #elif OGRE_COMPILER == OGRE_COMPILER_CLANG
207 # if defined(_LIBCPP_VERSION)
210 typedef ::std::tr1::hash< _StringBase >
_StringHash;
212 #elif OGRE_COMPILER == OGRE_COMPILER_MSVC && OGRE_COMP_VER >= 1600 && !defined(STLPORT) // VC++ 10.0
213 typedef ::std::tr1::hash< _StringBase >
_StringHash;
214 #elif !defined( _STLP_HASH_FUN_H )
215 typedef stdext::hash_compare< _StringBase, std::less< _StringBase > >
_StringHash;
226 #if OGRE_DEBUG_MODE && (OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT)
227 # pragma push_macro("NOMINMAX")
229 # include <windows.h>
230 # pragma pop_macro("NOMINMAX")
231 # define Ogre_OutputCString(str) ::OutputDebugStringA(str)
232 # define Ogre_OutputWString(str) ::OutputDebugStringW(str)
234 # define Ogre_OutputCString(str) std::cerr << str
235 # define Ogre_OutputWString(str) std::cerr << str
238 #endif // _String_H__
static bool startsWith(const String &str, const String &pattern, bool lowerCase=true)
Returns whether the string begins with the pattern passed in.
static const String replaceAll(const String &source, const String &replaceWhat, const String &replaceWithWhat)
replace all instances of a sub-string with a another sub-string.
stdext::hash_compare< _StringBase, std::less< _StringBase > > _StringHash
static vector< String >::type split(const String &str, const String &delims="\t\n ", unsigned int maxSplits=0, bool preserveDelims=false)
Returns a StringVector that contains all the substrings delimited by the characters in the passed del...
static void toLowerCase(String &str)
Lower-cases all the characters in the string.
StringStream StrStreamType
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 void splitFilename(const String &qualifiedName, String &outBasename, String &outPath)
Method for splitting a fully qualified filename into the base name and path.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
_StringStreamBase StringStream
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 String standardisePath(const String &init)
Method for standardising paths - use forward slashes only, end with slash.
static void splitBaseFilename(const Ogre::String &fullName, Ogre::String &outBasename, Ogre::String &outExtention)
Method for splitting a filename into the base name and extension.
Utility class for manipulating Strings.
static bool endsWith(const String &str, const String &pattern, bool lowerCase=true)
Returns whether the string ends with the pattern passed in.
static vector< String >::type tokenise(const String &str, const String &delims="\t\n ", const String &doubleDelims="\"", unsigned int maxSplits=0)
Returns a StringVector that contains all the substrings delimited by the characters in the passed del...
static String normalizeFilePath(const String &init, bool makeLowerCase=true)
Returns a normalized version of a file path This method can be used to make file path strings which p...
static bool match(const String &str, const String &pattern, bool caseSensitive=true)
Simple pattern-matching routine allowing a wildcard pattern.
static void toUpperCase(String &str)
Upper-cases all the characters in the string.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.