TextTools

Static variables

@:value("pony.text.TextTools")staticinlineread onlyMODULE:String = "pony.text.TextTools"

@:value(["en" => "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "ru" => "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ", "num" => "0123456789"])staticletters:Map<String, String> = ["en" => "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "ru" => "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ", "num" => "0123456789"]

Static methods

staticaddToStringsBegin(s:Array<String>, v:String):Array<String>

staticaddToStringsEnd(s:Array<String>, v:String):Array<String>

staticinlineallAfter(str:String, delimiter:String, ?startIndex:Int):Null<String>

staticinlineallAfterLast(str:String, delimiter:String, ?startIndex:Int):Null<String>

staticinlineallBefore(str:String, delimiter:String, ?startIndex:Int):Null<String>

staticinlineallBeforeLast(str:String, delimiter:String, ?startIndex:Int):Null<String>

staticinlineansiForeground(s:String, c:AnsiForeground):String

staticinlineansiUnderlined(s:String):String

@:externstaticinlinearrayMaxLength(a:Array<String>):Int

@:externstaticinlinearrayMinLength(a:Array<String>):Int

staticbetweenReplace(text:String, begin:String, end:String, value:String):String

staticbetweenReplaceFile(file:String, begin:String, end:String, value:String):Void

Available on neko, nodejs

staticbigFirst(s:String):String

staticcharCodeCount(s:String, char:Int):Int

staticinlinecharCount(s:String, char:String):Int

staticcheckLang(s:String, lang:String):Bool

staticcheckSymbols(a:String, b:String):Bool

Checks a string contains b string symbols

staticconvertToANSI(s:String, lang:String):String

staticinlineexists(s:String, ch:String):Bool

staticexplode(s:String, delimiters:Array<String>):Array<String>

staticext(s:String):SPair<String>

staticinlinefirstSplit(str:String, delimiter:String, ?startIndex:Int):SPair<String>

staticgetMaxLength(a:String, b:Int):Int

staticgetMinLength(a:String, b:Int):Int

statichaveAllSymbolsFromList(str:String, list:String):Bool

statichaveAnySymbolFromList(str:String, list:String):Bool

staticinlinehaveNumbers(str:String):Bool

staticincludeFile(file:Dynamic):Dynamic

staticincludeFileFromCurrentDir(file:Dynamic):Dynamic

staticincludeJson(file:Dynamic):Dynamic

staticincludeJsonFromCurrentDir(file:Dynamic):Dynamic

staticincludePath(path:Dynamic):Dynamic

staticincludePathFromCurrentDir(path:Dynamic):Dynamic

staticinlineisFalse(s:String):Bool

staticinlineisTrue(s:String):Bool

staticinlinelast(s:String):String

staticinlinelastSplit(str:String, delimiter:String, ?startIndex:Int):SPair<String>

staticlines(s:String):Array<String>

staticinlinemaxLength(a:String, b:String):Int

staticinlineminLength(a:String, b:String):Int

@:value({ lang : "en" })staticonlyLetters(str:String, lang:String = "en"):String

@:value({ lang : "en" })staticonlyLettersWithLower(str:String, lang:String = "en"):String

staticinlineparsePercent(s:String):Float

@:value({ q : "\"" })staticinlinequote(s:String, q:String = "\""):String

staticremoveQuotes(s:String):String

staticremoveTab(s:String, ?tab:String):String

staticrepeat(s:String, count:Int):String

@:value({ q : "\"" })staticinlinereplaceInQuote(s:String, sub:String, by:String, q:String = "\""):String

staticinlinereplaceInSingleQuote(s:String, sub:String, by:String):String

staticreplaceXmlAttr(src:String, attr:String, newval:String):String

staticinlinesetLast(s:String, ch:String):String

staticinlinesingleQuote(s:String):String

staticsmallFirst(s:String):String

staticstrictCheckSymbols(a:String, b:String):Bool

Strict checks a string contains b string symbols

statictabParser(s:String, ?tab:String):Dynamic

statictextLineLimit(text:String, len:Int):String

staticuniqueSymbols(s:String):Bool

String have only unique symbols