5#ifndef __IRR_CORE_UTIL_H_INCLUDED__
6#define __IRR_CORE_UTIL_H_INCLUDED__
75 while ( *
p !=
'/' && *
p !=
'\\' &&
p != s )
125 while ( (pos = path.
findNext (
'/', pos )) >= 0 )
132 while ( (pos =
file.findNext (
'/', pos )) >= 0 )
151 if ( name[i] ==
'.' )
155 *extension = name.
subString ( extpos + 1, name.
size() - (extpos + 1), make_lower );
158 if ( name[i] ==
'/' || name[i] ==
'\\' )
161 *filename = name.
subString ( i + 1, extpos - (i + 1), make_lower );
164 *path = name.
subString ( 0, i + 1, make_lower );
172 *filename = name.
subString ( 0, extpos, make_lower );
181inline s32 isspace(
s32 c) {
return c ==
' ' || c ==
'\f' || c ==
'\n' || c ==
'\r' || c ==
'\t' || c ==
'\v'; }
Axis aligned bounding box in 3d dimensional space.
u32 size() const
Returns length of the string's content.
string< T > subString(u32 begin, s32 length, bool make_lower=false) const
Returns a substring.
string< T, TAlloc > & replace(T toReplace, T replaceWith)
Replaces all characters of a special type with another one.
s32 findNext(T c, u32 startPos) const
finds next occurrence of character in string
bool equalsn(const string< T, TAlloc > &other, u32 n) const
compares the first n characters of the strings
io::path & deletePathFromPath(io::path &filename, s32 pathCount)
trim paths
bool hasFileExtension(const io::path &filename, const io::path &ext0, const io::path &ext1="", const io::path &ext2="")
search if a filename has a proper extension
io::path & getFileNameExtension(io::path &dest, const io::path &source)
get the filename extension from a file path
s32 isFileExtension(const io::path &filename, const io::path &ext0, const io::path &ext1, const io::path &ext2)
search if a filename has a proper extension
s32 isdigit(s32 c)
some standard function ( to remove dependencies )
io::path & deletePathFromFilename(io::path &filename)
delete path from filename
io::path & cutFilenameExtension(io::path &dest, const io::path &source)
cut the filename extension from a source file path and store it in a dest file path
s32 isInSameDirectory(const io::path &path, const io::path &file)
Everything in the Irrlicht Engine can be found in this namespace.
char fschar_t
Type name for character type used by the file system.
signed int s32
32 bit signed variable.