Strings

1
2
3
4
5
6
7
8
use "collections"

primitive Strings
  fun contains_only(s: String, bytes: Set[U8]): Bool =>
    for byte in s.values() do
      if (not bytes.contains(byte)) then return false end
    end
    true