This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.
lineBreakLengthAt
function lineBreakLengthAt(text, index): number;Defined in: packages/engine/src/utilities/Strings.ts:61
The length of the line break that starts at index, or 0 when none does.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
text | string | The document. |
index | number | A position in it. |
Returns
Section titled “Returns”number
2 for a CRLF pair, 1 for a lone CR or LF, 0 otherwise.