Takes a string, linear index position and optional line split delimiter (or regexp, default: "\n"). Computes and returns position of index as 1-based cursor coords tuple: [line, column]
[line, column]
computeCursorPos("thi.ng\numbrella", 10); // [ 2, 4 ]
-
Generated using TypeDoc
Takes a string, linear index position and optional line split delimiter (or regexp, default: "\n"). Computes and returns position of index as 1-based cursor coords tuple:
[line, column]
computeCursorPos("thi.ng\numbrella", 10); // [ 2, 4 ]