module type StringType =sig..end
This signature lists few basic operations provided by all string types.
The actual implementation may use any (coherent) scheme of indexing of strings. Below the term 'indexing unit' can stay either for byte or character (or whatever employed by the implementation).
This determines meaning of all int arguments and results (excluding result of compare).
type t
Type for strings.
val length : t -> intLength - number of indexing units
type tchar
Character type used by t.
val get : t -> int -> tcharUsual get function.
val lift_char : char -> tcharConvert Latin-1 character to tchar.
val lift : string -> tConvert from UTF-8 string of primitive string type.
val to_string : t -> stringConvert to primitive string with UTF-8 content.
val concat_with_separators : t ->
t list -> tconcat_with_separators sep lst catenates all n elements of lst inserting (n-1) copies of sep in between.
val compare : t -> t -> intUsual comparison function.
val iter : (tchar -> unit) -> t -> unit
val iteri : (int -> tchar -> unit) ->
t -> unit
val sub : t -> int -> int -> tAs String.sub, but indexed in specific way.
val rindex : t -> char -> int
module Parse:sig..end