package accessor_base

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

Access the characters in a string as a list.

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

Access a reversed version of a string.

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

Access each character in a string.

val eachi : ((Base.int * 'i) -> Base.char -> Base.char, 'i -> Base.string -> Base.string, [< Accessor_base__.Import.many ]) Accessor.t

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

val split_n : Base.int -> (_, Base.string * Base.string, Base.string, [< Accessor_base__.Import.isomorphism ]) Accessor.Simple.t

Access the tuple produced by splitting a string at the given index.

val prefixed : Base.string -> (_, Base.string, Base.string, [< Accessor_base__.Import.variant ]) Accessor.Simple.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.Simple.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.Simple.t

Access the string converted to the given type, or access nothing if conversion fails.

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

Access the string converted to the given type, raising if conversion fails.