Documentation

Batteries.Data.String.Basic

def String.count (s : String) (c : Char) :

Count the occurrences of a character in a string.

Equations
Instances For

    Convert a string of assumed-ASCII characters into a byte array. (If any characters are non-ASCII they will be reduced modulo 256.)

    Note: if you just need the underlying ByteArray of a non-ASCII string, use String.toUTF8.

    Equations
    Instances For
      @[irreducible]

      Internal implementation of toAsciiByteArray. loop p out = out ++ toAsciiByteArray ({ s with startPos := p } : Substring)

      Equations
      Instances For