Module CCStringLabels.Sub
val copy : t -> stringMake a copy of the substring.
val get : t -> int -> charget s igets 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 -> intReturn the length (number of characters) of the given string.
val blit : src:t -> src_pos:int -> dst:Bytes.t -> dst_pos:int -> len:int -> unitLike
String.blit. Compatible with the-safe-stringoption.- raises Invalid_argument
if indices are not valid.
val fold : f:('a -> char -> 'a) -> init:'a -> t -> 'aFold on chars by increasing index.
- since
- 0.7
Conversions
val to_std_seq : t -> char Seq.tto_std_seq sreturns aSeq.tof the bytes ins.- since
- 2.8
val to_seq : t -> char sequenceval to_klist : t -> char klistval to_list : t -> char listReturn the list of characters contained in the string.
val pp_buf : Buffer.t -> t -> unitRenamed from
ppsince 2.0.
val pp : Format.formatter -> t -> unitPrint the string within quotes.
Renamed from
printsince 2.0.