Module CCString.Sub
val copy : t -> string
Make a copy of the substring.
val get : t -> int -> char
get s i
gets thei
-th element, or fails.- raises Invalid_argument
if the index is not within
0 ... length - 1
.
- since
- 1.2
include S with type t := t
val length : t -> int
Return the length (number of characters) of the given string.
val blit : t -> int -> Stdlib.Bytes.t -> int -> int -> unit
Like
String
.blit. Compatible with the-safe-string
option.- raises Invalid_argument
if indices are not valid.
val fold : ('a -> char -> 'a) -> 'a -> t -> 'a
Fold on chars by increasing index.
- since
- 0.7
Conversions
val to_list : t -> char list
Return the list of characters contained in the string.
val pp_buf : Stdlib.Buffer.t -> t -> unit
Renamed from
pp
since 2.0.
val pp : Stdlib.Format.formatter -> t -> unit
Print the string within quotes.
Renamed from
print
since 2.0.