Mount Fuji Engine  0.8b
Data Structures | Functions
String Functions

Data Structures

class  MFString
 Fuji String class. More...
 
struct  DString
 Implements a D language string. More...
 

Functions

MF_API void * MFCopyMemory (void *pDest, const void *pSrc, size_t size)
 Copy memory. More...
 
MF_API void * MFZeroMemory (void *pDest, size_t size)
 Zero memory. More...
 
MF_API void * MFMemSet (void *pDest, int value, size_t size)
 Initialise memory. More...
 
MF_API int MFMemCompare (const void *pBuf1, const void *pBuf2, size_t size)
 Compare memory. More...
 
size_t MFString_Length (const char *pString)
 Get the length of a string. More...
 
size_t MFString_LengthN (const char *pString, size_t maxChars)
 Get the length of a string clamping to a given maximum. More...
 
char * MFString_Copy (char *pBuffer, const char *pString)
 Copy a string. More...
 
char * MFString_CopyN (char *pBuffer, const char *pString, size_t maxChars)
 Copy a string with a maximum number of characters. More...
 
char * MFString_CopyUntil (char *pBuffer, const char *pString, int terminator)
 Copy a string with custom terminator. More...
 
char * MFString_Cat (char *pBuffer, const char *pString)
 Concatinate a string. More...
 
char * MFString_CopyCat (char *pBuffer, const char *pString, const char *pString2)
 Concatinate 2 strings into a target buffer. More...
 
MF_API char * MFString_Dup (const char *pString)
 Duplicate a string. More...
 
MF_API const char * MFString_ToLower (const char *pString)
 Convert a string to lower case. More...
 
MF_API const char * MFString_ToUpper (const char *pString)
 Convert a string to upper case. More...
 
MF_API int MFString_Compare (const char *pString1, const char *pString2)
 Compares 2 strings. More...
 
MF_API int MFString_CompareN (const char *pString1, const char *pString2, size_t n)
 Compares 2 strings with a maximum character limit. More...
 
MF_API int MFString_CaseCmp (const char *pString1, const char *pString2)
 Compares 2 strings with case insensitivity. More...
 
MF_API int MFString_CaseCmpN (const char *pString1, const char *pString2, size_t n)
 Compares 2 strings with case insensitivity and a maximum character limit. More...
 
char * MFString_Chr (const char *pString, int c)
 Searches through a string for the specified character. More...
 
char * MFString_RChr (const char *pString, int c)
 Searches backwards through a string for the specified character. More...
 
char * MFString_GetFileExtension (const char *pFilename)
 Get file extension from filename. More...
 
const char * MFStr_GetFileName (const char *pFilename)
 Get the filename from a path. More...
 
const char * MFStr_GetFileNameWithoutExtension (const char *pFilename)
 Get the filename without its extension from a path. More...
 
const char * MFStr_GetFilePath (const char *pFilename)
 Get the file path from a path string. More...
 
const char * MFStr_TruncateExtension (const char *pFilename)
 Truncate the file extension. More...
 
MF_API bool MFString_PatternMatch (const char *pPattern, const char *pFilename, const char **ppMatchDirectory=NULL, bool bCaseSensitive=false)
 String pattern match. More...
 
MF_API const char * MFStr_URLEncodeString (const char *pString, const char *pExcludeChars=NULL)
 URL encode a string. More...
 
MF_API size_t MFString_URLEncode (char *pDest, const char *pString, const char *pExcludeChars=NULL)
 URL encode a string. More...
 
MF_API const char * MFStr (const char *format,...) MFPRINTF_FUNC(1
 Get a formatted a string. More...
 
MF_API const char MF_API const
char * 
MFStrN (const char *source, size_t n)
 Copy a specified number of characters from one string into a new string. More...
 
MF_API bool MFString_IsNumber (const char *pString, bool bAllowHex=true)
 Test if a string is a number. More...
 
MF_API int MFString_AsciiToInteger (const char *pString, bool bDetectBase=true, int base=10, const char **ppNextChar=NULL)
 Parse an integer from a string. More...
 
MF_API float MFString_AsciiToFloat (const char *pString, const char **ppNextChar=NULL)
 Parse a float from a string. More...
 
bool MFIsWhite (int c)
 Test if the specified character is a while space character.
 
bool MFIsAlpha (int c)
 Test if the specified character is an alphabetic character.
 
bool MFIsNumeric (int c)
 Test if the specified character is a numeric character.
 
bool MFIsAlphaNumeric (int c)
 Test if the specified character is an alphabetic or numeric character.
 
bool MFIsHex (int c)
 Test if the specified character is a hexadecimal character.
 
bool MFIsNewline (int c)
 Test if the specified character is a newline character.
 
bool MFIsLower (int c)
 Test if a character is a lower case alphabetic character.
 
bool MFIsUpper (int c)
 Test if a character is an upper case alphabetic character.
 
int MFToLower (int c)
 Converts a character to lower case.
 
int MFToUpper (int c)
 Converts a character to lower case.
 
char * MFSeekDelimiter (char *pC, const char *pDelimiters=" \t\r\n")
 Returns a pointer to the first instance of a specified delimeter.
 
const char * MFSeekDelimiter (const char *pC, const char *pDelimiters=" \t\r\n")
 Returns a pointer to the first instance of a specified delimeter.
 
char * MFSeekNewline (char *pC)
 Returns a pointer to the start of the next line in the provided string.
 
const char * MFSeekNewline (const char *pC)
 Returns a pointer to the start of the next line in the provided string.
 
char * MFSeekNextWord (char *pC)
 Returns a pointer to the start of the next word.
 
const char * MFSeekNextWord (const char *pC)
 Returns a pointer to the start of the next word.
 
char * MFSkipDelimiters (char *pC, const char *pDelimiters=" \t\r\n")
 Returns a pointer to the next non-white space character in the provided string.
 
const char * MFSkipDelimiters (const char *pC, const char *pDelimiters=" \t\r\n")
 Returns a pointer to the next non-white space character in the provided string.
 
char * MFSkipWhite (char *pC)
 Returns a pointer to the next non-white space character in the provided string.
 
const char * MFSkipWhite (const char *pC)
 Returns a pointer to the next non-white space character in the provided string.
 
int MFString_GetNumChars (const char *pString)
 Get the number of actual characters in a string. More...
 
size_t MFString_GetCharacterOffset (const char *pString, int character)
 Get the character offset from the start of a string. More...
 
int MFString_EncodeUTF8 (int c, char *pMBChar)
 Encode a unicode character to a UTF-8 sequence. More...
 
int MFString_DecodeUTF8 (const char *pMBChar, int *pNumBytes)
 Decode a UTF-8 sequence. More...
 
char * MFString_NextChar (const char *pChar)
 Move to the next character in a UTF-8 encoded string. More...
 
char * MFString_PrevChar (const char *pChar)
 Move to the previous character in a UTF-8 encoded string. More...
 
MF_API size_t MFWString_CopyUTF8ToUTF16 (wchar_t *pBuffer, const char *pString)
 Copy a UTF-8 string to a UTF-16 string. More...
 
MF_API wchar_t * MFString_UFT8AsWChar (const char *pUTF8String, size_t *pNumChars=NULL)
 Convert a UTF-8 string to a temporary UTF-16 string. More...
 
MF_API size_t MFString_CopyUTF16ToUTF8 (char *pBuffer, const wchar_t *pString)
 Convert a UTF16 string to a UTF8 string. More...
 
size_t MFWString_Length (const wchar_t *pString)
 Get the length of a unicode string. More...
 
wchar_t * MFWString_Copy (wchar_t *pBuffer, const wchar_t *pString)
 Copy a unicode string. More...
 
wchar_t * MFWString_CopyN (wchar_t *pBuffer, const wchar_t *pString, size_t maxChars)
 Copy a unicode string with a maximum number of characters. More...
 
wchar_t * MFWString_Cat (wchar_t *pBuffer, const wchar_t *pString)
 Concatinate a unicode string. More...
 
wchar_t * MFWString_CopyCat (wchar_t *pBuffer, const wchar_t *pString, const wchar_t *pString2)
 Concatinate 2 unicode strings into a target buffer. More...
 
int MFWString_Compare (const wchar_t *pString1, const wchar_t *pString2)
 Compares 2 unicode strings. More...
 
int MFWString_CaseCmp (const wchar_t *pString1, const wchar_t *pString2)
 Compares 2 unicode strings with case insensitivity. More...
 
wchar_t * MFSeekDelimiterW (wchar_t *pC, const wchar_t *pDelimiters=L" \t\r\n")
 Returns a pointer to the first instance of a specified delimeter.
 
const wchar_t * MFSeekDelimiterW (const wchar_t *pC, const wchar_t *pDelimiters=L" \t\r\n")
 Returns a pointer to the first instance of a specified delimeter.
 
wchar_t * MFSeekNewlineW (wchar_t *pC)
 Returns a pointer to the start of the next line in the provided string.
 
const wchar_t * MFSeekNewlineW (const wchar_t *pC)
 Returns a pointer to the start of the next line in the provided string.
 
wchar_t * MFSeekNextWordW (wchar_t *pC)
 Returns a pointer to the start of the next word.
 
const wchar_t * MFSeekNextWordW (const wchar_t *pC)
 Returns a pointer to the start of the next word.
 
wchar_t * MFSkipWhiteW (wchar_t *pC)
 Returns a pointer to the next non-white space character in the provided string.
 
const wchar_t * MFSkipWhiteW (const wchar_t *pC)
 Returns a pointer to the next non-white space character in the provided string.
 
MFString operator+ (const char *pString, const MFString &string)
 Concatinate operator.
 
MF_API MFString MFString_GetStats ()
 Generate a string describing the state of the string heap. More...
 
MF_API void MFString_Dump ()
 Dump the state of the string heap. More...
 

Detailed Description