CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.1.1 (changelog, source)
Search

Member predicate Line::getTerminator

Gets the terminator character(s) of this line.

This predicate may return:

  • the empty string if this line is the last line in a file and there is no line terminator after it;
  • a single-character string containing the character \n (newline), \r (carriage return), \u2028 (Unicode character LINE SEPARATOR) or \u2029 (Unicode character PARAGRAPH SEPARATOR);
  • the two-character string \r\n (carriage return followed by newline).
string getTerminator()