1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00
SqMod/source/Library/String.hpp

40 lines
1.5 KiB
C++
Raw Normal View History

2015-09-30 02:56:11 +02:00
#ifndef _LIBRARY_STRING_HPP_
#define _LIBRARY_STRING_HPP_
// ------------------------------------------------------------------------------------------------
#include "SqBase.hpp"
2015-09-30 02:56:11 +02:00
// ------------------------------------------------------------------------------------------------
namespace SqMod {
/* ------------------------------------------------------------------------------------------------
* Utility used to generate a string with an arbitrary text surrounded by a specific character
2015-09-30 02:56:11 +02:00
*/
CSStr LeftStr(CSStr t, SQChar f, Uint32 w);
CSStr LeftStr(CSStr t, SQChar f, Uint32 w, Uint32 o);
CSStr RightStr(CSStr t, SQChar f, Uint32 w);
CSStr RightStr(CSStr t, SQChar f, Uint32 w, Uint32 o);
CSStr CenterStr(CSStr t, SQChar f, Uint32 w);
/* ------------------------------------------------------------------------------------------------
* Get a new string with only the alpha numeric characters from the specified string.
*/
CSStr StrJustAlphaNum(CSStr str);
Buffer StrJustAlphaNumB(CSStr str);
/* ------------------------------------------------------------------------------------------------
* Convert the specified string to lowercase.
*/
CSStr StrToLowercase(CSStr str);
Buffer StrToLowercaseB(CSStr str);
2015-09-30 02:56:11 +02:00
/* ------------------------------------------------------------------------------------------------
* Convert the specified string to uppercase.
*/
CSStr StrToUppercase(CSStr str);
Buffer StrToUppercaseB(CSStr str);
2015-09-30 02:56:11 +02:00
} // Namespace:: SqMod
#endif // _LIBRARY_STRING_HPP_