package accessor_base

  1. Overview
  2. Docs
val list : (_, Base.char Base.list, Base.string, [< Accessor_base__.Import.isomorphism ]) Accessor.t

Access the characters in a string as a list.

val reversed : (_, Base.string, Base.string, [< Accessor_base__.Import.isomorphism ]) Accessor.t

Access a reversed version of a string.

val each : (_, Base.char, Base.string, [< Accessor_base__.Import.many ]) Accessor.t

Access each character in a string.

val eachi : (Base.int * _, Base.char, Base.string, [< Accessor_base__.Import.many ]) Accessor.Indexed.t

The indexed version of each adds the numeric index of each character accessed to the index.

val prefixed : Base.string -> (_, Base.string, Base.string, [< Accessor_base__.Import.variant ]) Accessor.t

Access the suffix of a string that begins with the given prefix, or nothing if the string has a different prefix.

val suffixed : Base.string -> (_, Base.string, Base.string, [< Accessor_base__.Import.variant ]) Accessor.t

Access the prefix of a string that ends with the given suffix, or nothing if the string has a different suffix.

val conv : (module Base.Stringable.S with type t = 'a) -> (_, 'a, Base.string, [< Accessor_base__.Import.variant ]) Accessor.t

Access the string converted to the given type, or access nothing if conversion fails. The well behavedness of this accessor just depends on the Stringable argument.

val conv_strict : (module Base.Stringable.S with type t = 'a) -> (_, 'a, Base.string, [< Accessor_base__.Import.isomorphism ]) Accessor.t

Access the string converted to the given type, raising if conversion fails. The well behavedness of this accessor just depends on the Stringable argument.

OCaml

Innovation. Community. Security.