module Substring_intf: Substring_intf
A substring is a contiguous set of characters within a string. Creating a substring
does not copy. Therefore modifying the string also modifies the substring.
module type S = sig
.. end
A substring is a contiguous set of characters within a string. Creating a substring
does not copy. Therefore modifying the string also modifies the substring.
the type of strings that type t is a substring of
The pos refers to the position in the base string, not any other substring that this
substring was generated from.
create ?pos ?len base
creates a substring of the base sequence of
length len
starting at position pos
, i.e.
base.[pos], base.[pos + 1], ... base.[pos + len - 1]
It is required that:
0 <= pos
0 <= len
pos + len <= length base
It does not copy the characters.
Blit functions
for copying characters from a substring to and from both strings
and substrings.
String concatenation
Conversion to substrings
. These may share memory with the thing from which they
are copying.
these two functions perform a copy
Prefixes and suffixes
The result of these functions may share data with their
input.