@svizzle/utils/string-number

Methods

(static) getEndOfLineLength() → {number}

Source:
Since:
  • 0.9.0

Return the length of the end of line, if any.

Example
> getEndOfLineLength('hello')
0
> getEndOfLineLength('hello\n')
1
> getEndOfLineLength('hello\r\n')
2
Parameters:
Type Description
string
Returns:
Type
number