Skip to content

std/string

std/string::String is an owned mutable UTF-8 buffer.

Key APIs:

  • string::New()
  • string::FromStr(text)
  • String::PushStr, Write
  • String::Len, Capacity, IsEmpty
  • String::AsStr, Bytes
  • String::Release
import "std/string"
fn main() {
let mut s = string::FromStr("hello")
s.PushStr(" ferret")
println(s.AsStr())
s.Release()
}