package libsail

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val trim_position : string -> Stdlib.Lexing.position -> Stdlib.Lexing.position

Assuming a position is at the start of a string, move it to the position of the first character that would not get removed by String.trim

val advance_position : ?after:int -> trim:bool -> string -> Stdlib.Lexing.position -> Stdlib.Lexing.position

Assuming a position represents the start of a string, advance it to the end of the string, plus 'after' characters (default 0). If trim is true, then the position is moved to the last non-whitespace character.

val string_location : trim:bool -> start:Stdlib.Lexing.position -> string -> Parse_ast.l

Assuming a position represents the start of a string, create a location representing the contents of the string. If trim is true, whitespace at the start and end is not included in the location.

OCaml

Innovation. Community. Security.