Utility functions for manipulating text in a code editor.
Static methods
staticcharIdx2LineCharIdx(str:String, charIdx:Int, lineDelim:String):TextEditorPosition
Return line and character index from absolute character index.
staticendOfWord(line:String, charIndex:Int, ?nonWordCharacters:Array<String>):Int
Returns the character index of the end of the current word (exclusive).
staticgetFirstIndentAtStartOfLine(line:String, tabSize:Int, includePartial:Bool = false):String
Return the first indent (either a tab or a set of spaces with the specified tab size) at the start of a line.
staticgetIndentAtStartOfLine(line:String, tabSize:Int, includePartial:Bool = false):String
Gets the full string of whitespace indents (tabs and spaces) at the start of a line.
staticgetIndentCountAtStartOfLine(line:String, tabSize:Int, includePartial:Bool = false):Int
Gets the number of whitespace indents (tabs and spaces) at the start of a line.
staticindentAmountBySpaceAndTab(line:String):Dynamic
Determines the amount of indentation combining space and tabs on a line.
staticisWordCharacter(char:String, ?nonWordCharacters:Array<String>):Bool
Determines if a character is a word character or not.
staticlineCharIdx2charIdx(str:String, lineIdx:Int, charIdx:Int, lineDelim:String):Int
Return absolute character index from line and character index.
staticstartOfWord(line:String, charIndex:Int, ?nonWordCharacters:Array<String>):Int
Returns the character index of the beginning of the current word (inclusive).