Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val init : string -> t
val show : t -> string
val length : t -> int
length i
return remaining length (String.length i.s - i.pos
).
val is_at_end : t -> bool
val has_length : t -> int -> bool
val sub_unsafe : t -> int -> string
sub_unsafe i len
return sub string of i.s
from i.pos..i.pos + len
.
val rest_unsafe : t -> string
rest_unsafe i
returns the rest of the input from i.pos
.
val rest : t -> string
val rest_of_len_unsafe : int -> t -> string
rest_of_len_unsafe len i
returns the rest of the input from i.pos .. i.pos + len
.
val rest_of_len : int -> t -> string
val get_unsafe : int -> t -> char
get_unsafe pos i
returns the character at position i.pos + pos
.
val get : int -> t -> char
val first_unsafe : t -> char
first_unsafe i
returns the character at position i.pos
.
val first : t -> char
val take_while_fn : t -> ?max:int -> (char -> bool) -> int
take_while_fn i max f
returns a sub string from i.pos
to the first character where f c
fails.
val starts_with : t -> string -> bool
starts_with i s
returns true if input starts with s. does not create any temporary strings by using String.sub.