navid/haze / cb1bac46fbd9fca0f0e2a401590740b0840b47821983a25743fc29c1572577d9 / samples/baseline_2.9/str_immutable_error.hz

str_immutable_error.hz

← samples/baseline_2.9 · 125 bytes · raw · download

// Strings are immutable; mutate their bytes instead.

fn main() {
    var text = "hello"
    text[0] = 72
    print(text)
}