2015-09-30 02:56:11 +02:00
|
|
|
#ifndef _LIBRARY_STRING_HPP_
|
|
|
|
#define _LIBRARY_STRING_HPP_
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
#include "SqBase.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Utility used to generate a string with an arbitrary text surrounded by a specific character
|
2015-09-30 02:56:11 +02:00
|
|
|
*/
|
2016-03-25 00:41:30 +01: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);
|
2016-02-20 23:25:00 +01:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Get a new string with only the alpha numeric characters from the specified string.
|
|
|
|
*/
|
|
|
|
CSStr StrJustAlphaNum(CSStr str);
|
2016-03-25 00:54:43 +01:00
|
|
|
Buffer StrJustAlphaNumB(CSStr str);
|
2016-02-20 23:25:00 +01:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert the specified string to lowercase.
|
|
|
|
*/
|
|
|
|
CSStr StrToLowercase(CSStr str);
|
2016-03-25 00:54:43 +01:00
|
|
|
Buffer StrToLowercaseB(CSStr str);
|
2015-09-30 02:56:11 +02:00
|
|
|
|
2016-02-21 09:30:47 +01:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert the specified string to uppercase.
|
|
|
|
*/
|
|
|
|
CSStr StrToUppercase(CSStr str);
|
2016-03-25 00:54:43 +01:00
|
|
|
Buffer StrToUppercaseB(CSStr str);
|
2016-02-21 09:30:47 +01:00
|
|
|
|
2015-09-30 02:56:11 +02:00
|
|
|
} // Namespace:: SqMod
|
|
|
|
|
2016-02-20 23:25:00 +01:00
|
|
|
#endif // _LIBRARY_STRING_HPP_
|