SML# Document Version 4.0.0
26 Standard ML Basis Library

26.31 STRING_CVT

Provide primitives for string manipulation.

signature STRING_CVT =
sig
  datatype radix = BIN | OCT | DEC | HEX
  type (’a,’b) reader = ’b -> (’a * ’b) option
  datatype realfmt =
      SCI of int option
    | FIX of int option
    | GEN of int option
    | EXACT
  type cs
  val dropl : (char -> bool) -> (char, ’a) reader -> ’a -> ’a
  val padLeft : char -> int -> string -> string
  val padRight : char -> int -> string -> string
  val scanString : ((char, cs) reader -> (’a, cs) reader) -> string -> ’a option
  val skipWS : (char, ’a) reader -> ’a -> ’a
  val splitl : (char -> bool) -> (char, ’a) reader -> ’a -> string * ’a
  val takel : (char -> bool) -> (char, ’a) reader -> ’a -> string
end

Structures that implement the signature

  • StringCvt : STRING_CVT

    type cs (= boxed)