(** Return [true] if-and-only-if [f] returns [true] on at least one

+ val index_of_character: t -> ?from:int -> character -> int option

+ (** Find the first occurrence of a character in the string (starting

+ at position [from]). *)

+ val index_of_character_reverse: t -> ?from:int -> character -> int option

+ (** Do like [index_of_character] but start from the end of the string. *)

module Make_output: functor (Model: OUTPUT_MODEL) -> sig

val output: ('a, 'b, 'c) Model.channel -> t -> (unit, 'e, 'f) Model.thread

try (iter t (fun x -> if f x then raise Not_found else ()); false)

+ let index_of_character t ?(from=0) c =

+ try Some (String.index_from t from c)

+ let index_of_character_reverse t ?(from=0) c =

+ try Some (String.rindex_from t from c)

module Make_output (Model: OUTPUT_MODEL) = Model

| Not_found -> Some (List.rev !r)

+ let index_of_character t ?(from=0) c =

+ List.iter t ~f:(fun x ->

+ let index_of_character_reverse t ?(from=0) c =

+ let rec loop lgth acc = function

+ | h :: t -> loop (lgth + 1) (h :: acc) t in

+ match index_of_character rev ~from:(length - from - 1) c with

+ | Some c -> Some (length - c - 1)

module Make_output (Model: OUTPUT_MODEL) = struct