std.string

A UTF-8 encoded string

Values

let eq : Eq String

Eq a defines equality (==) on a

let ord : Ord String

Ord a defines an ordering on a

let show : Show String

Show a represents a conversion function from a to a readable string.

let semigroup : Semigroup String

Semigroup a represents an associative operation on a. This means the following laws must hold:

  • forall x . append x (append y z) == append (append x y) z

let monoid : Monoid String

Monoid a represents an semigroup an which has an identity. This means the following additional laws must hold:

  • forall x . append x empty == x
  • forall x . append empty x == x

let ++ : String -> String -> String

Appends two strings.

Re-export of semigroup.append.

let len : String -> Int

let is_empty : String -> Bool

let is_char_boundary : String -> Int -> Bool

let as_bytes : String -> Array Byte

let split_at : String -> Int -> (String, String)

let contains : String -> String -> Bool

let starts_with : String -> String -> Bool

let ends_with : String -> String -> Bool

let find : String -> String -> Option Int

let rfind : String -> String -> Option Int

let trim : String -> String

let trim_start : String -> String

let trim_start_matches : String -> String -> String

let trim_end : String -> String

let trim_end_matches : String -> String -> String

let append : String -> String -> String

let slice : String -> Int -> Int -> String

let from_utf8 : Array Byte -> Result () String

let char_at : String -> Int -> Char