2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
2011-04-28 22:16:32 -05:00
|
|
|
fn main() {
|
2011-07-27 07:19:39 -05:00
|
|
|
let s = "a";
|
2011-04-28 22:16:32 -05:00
|
|
|
s += "b";
|
2011-06-15 13:19:50 -05:00
|
|
|
assert (s.(0) == 'a' as u8);
|
|
|
|
assert (s.(1) == 'b' as u8);
|
2011-04-28 22:16:32 -05:00
|
|
|
s += "c";
|
|
|
|
s += "d";
|
2011-06-15 13:19:50 -05:00
|
|
|
assert (s.(0) == 'a' as u8);
|
|
|
|
assert (s.(1) == 'b' as u8);
|
|
|
|
assert (s.(2) == 'c' as u8);
|
|
|
|
assert (s.(3) == 'd' as u8);
|
|
|
|
}
|