[rust-dev] Using String and StrSlice

Christophe Pedretti christophe.pedretti at gmail.com
Sun Jun 1 11:20:49 PDT 2014

Hi all,

suppose i want to replace the i th character c (this character is ascii, so
represented by exactly one byte) in a String named buf with character 'a'

i can do this
buf =

if c is any UTF8 character, i can use
buf =

It's quite complex, no better way to do ?

Any future additional methods for String are planned ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140601/11452ef4/attachment.html>

More information about the Rust-dev mailing list