mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 16:57:16 +01:00
32 lines
1.2 KiB
C++
32 lines
1.2 KiB
C++
#ifndef _LIBRARY_STRING_HPP_
|
|
#define _LIBRARY_STRING_HPP_
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
#include "SqBase.hpp"
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
namespace SqMod {
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
* Utility used to generate a string with an arbitrary text surrounded by a specific character
|
|
*/
|
|
CSStr LeftStr(CSStr t, SQChar f, Uint32 w = 72);
|
|
CSStr LeftStr(CSStr t, SQChar f, Uint32 w = 72, Uint32 o = 0);
|
|
CSStr RightStr(CSStr t, SQChar f, Uint32 w = 72);
|
|
CSStr RightStr(CSStr t, SQChar f, Uint32 w = 72, Uint32 o = 0);
|
|
CSStr CenterStr(CSStr t, SQChar f, Uint32 w = 72);
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
* Get a new string with only the alpha numeric characters from the specified string.
|
|
*/
|
|
CSStr StrJustAlphaNum(CSStr str);
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
* Convert the specified string to lowercase.
|
|
*/
|
|
CSStr StrToLowercase(CSStr str);
|
|
|
|
} // Namespace:: SqMod
|
|
|
|
#endif // _LIBRARY_STRING_HPP_
|