package accessor_base

  1. Overview
  2. Docs

Module Accessor_base.StringSource

Sourceval list : (_, Base.char Base.list, Base.string, [< Accessor_base__.Import.isomorphism ]) Accessor.t

Access the characters in a string as a list.

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

Access a reversed version of a string.

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

Access each character in a string.

Sourceval 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.

Sourceval 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.

Sourceval 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.

Sourceval 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.

Sourceval 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.