quasilyte/goism

Implement missing string ops

quasilyte opened this issue · 3 comments

Operations:

s[index] -> nth string byte
len(s) -> string byte length
for K, V := range s 
  -> K is byteN
  -> V is rune

Possible representations:

  • unibyte strings. Easier to implement s[index], harder to implement for/range.
  • multibyte strings. Easier to implement for/range, harder to implement s[index]
  • vector of chars. Like unibyte strings, but can be less efficient

Can affect #26.

Still missing:

  • []byte(string) conversion
  • for/range over string