Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================
- //
- // FORMAT STRING AND TEXT
- //
- //============================================================
- string c_formatWordStr = "@@@@";
- string c_formatStartStr = "<s val=\""+c_formatWordStr+"\">";
- string c_formatEndStr = "</s>";
- text c_formatWordTxt = StringToText(c_formatWordStr);
- text c_formatStartTxt = StringToText(c_formatStartStr);
- text c_formatEndTxt = StringToText(c_formatEndStr);
- //============================================================
- // Format Style Tags
- //
- string FormatStyleStr (string format)
- {
- return StringReplaceWord(c_formatStartStr,c_formatWordStr,format,c_stringReplaceAll,false);
- }
- text FormatStyleTxt (text format)
- {
- return TextReplaceWord(c_formatStartTxt,c_formatWordTxt,format,c_stringReplaceAll,false);
- }
- //============================================================
- // Format String to styled String with String tag
- //
- string FormatSSS (string source, string format)
- {
- return FormatStyleStr(format)+source+c_formatEndStr;
- }
- //============================================================
- // Format String to styled Text with String tag
- //
- text FormatSTS (string source, string format)
- {
- return StringToText(FormatStyleStr(format)+source+c_formatEndStr);
- }
- //============================================================
- // Format String to styled Text with Text tag
- //
- text FormatSTT (string source, text format)
- {
- return FormatStyleTxt(format)+StringToText(source)+c_formatEndTxt;
- }
- //============================================================
- // Format Text to styled Text with String tag
- //
- text FormatTTS (text source, string format)
- {
- return FormatStyleTxt(StringToText(format))+source+c_formatEndTxt;
- }
- //============================================================
- // Format Text to styled Text with Text tag
- //
- text FormatTTT (text source, text format)
- {
- return FormatStyleTxt(format)+source+c_formatEndTxt;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement