Static methods

staticappendCSVOrTSV(baseText:String, appendText:String, id:String):String

staticappendSpecialXML(a:String, b:String, headers:Array<String>, footers:Array<String>):String

@:value({ parseRules : null })staticappendText(baseText:String, id:String, theDir:String, getModText:(String, String) ‑> String, ?parseRules:ParseRules):String

@:value({ parent : null })@:access(haxe.xml.Xml)staticinlinecopyXml(data:Xml, ?parent:Xml):Xml

staticfilterASCII(str:String):String

Filters a unicode string to only contain characters that are valid in a filename.

@:genericstaticfilterUnique<T>(input:Array<T>):Array<T>

staticlistAllParentDirs(filePath:String):Array<String>

For a given file, return a list of all its parent directories.

Parameters:

filePath

Returns:

Array

@:value({ parseRules : null })staticmergeAndAppendText(baseText:String, id:String, dirs:Array<String>, getModText:(String, String) ‑> String, fileSystem:IFileSystem, ?parseRules:ParseRules):String

@:value({ parseRules : null, theDir : "" })staticmergeText(baseText:String, id:String, theDir:String = "", getModText:(String, String) ‑> String, ?parseRules:ParseRules):String

Looks for a '_merge' entry for an asset and tries to merge its contents into the original With the following rules: - Only applies to XML, TSV, and CSV files (identified by extension) - Adds single nodes from the merged asset into the original - If the original has that node too, it overwrites the original information @return

Parameters:

baseText

the basic text file you're merging extra content into

id

the name of the asset file

getModText

a function for getting the mod's contribution

mergeRules

formatting rules to help with merging

@:value({ theDir : "" })staticinlinepathMerge(id:String, theDir:String = ""):String

@:value({ theDir : "", special : "" })staticpathSpecial(id:String, special:String = "", theDir:String = ""):String

staticsl():String

staticstripPathPrefix(value:String, prefix:String):String

@:value({ footers : null, headers : null, stripFooter : true, stripHeader : true })staticstripXML(txt:String, stripHeader:Bool = true, stripFooter:Bool = true, ?headers:Array<String>, ?footers:Array<String>):String

staticuCat(a:String, b:String):String

String concatenation with UTF-8 compatibility.

Parameters:

a
b

Returns:

String

staticuCharAt(str:String, index:Int):String

@:value({ lowerCase : false })staticuExtension(str:String, lowerCase:Bool = false):String

staticuIndexOf(str:String, substr:String, ?startIndex:Int):Int

staticuJoin(arr:Array<String>, token:String):String

staticuLastIndexOf(str:String, value:String, ?startIndex:Int):Int

staticuLength(str:String):Int

staticuSplit(str:String, substr:String):Array<String>

staticuSplitReplace(s:String, substr:String, by:String):String

staticuSubstr(str:String, pos:Int, ?len:Int):String

staticuSubstring(str:String, startIndex:Int, ?endIndex:Int):String

staticunzipBytes(compressedBytes:Bytes):Bytes

Runs the 'Inflate' decompression algorithm on the raw compressed bytes and returns the uncompressed data.

Parameters:

bytes

A raw block of compressed bytes

Returns:

A raw block of uncompressed bytes