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-02-20 23:25:00 +01:00
|
|
|
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);
|
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);
|
|
|
|
|
2015-09-30 02:56:11 +02:00
|
|
|
} // Namespace:: SqMod
|
|
|
|
|
2016-02-20 23:25:00 +01:00
|
|
|
#endif // _LIBRARY_STRING_HPP_
|