2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
2011-04-28 22:16:32 -05:00
|
|
|
fn main() {
|
2012-03-22 10:39:41 -05:00
|
|
|
let mut s = "a";
|
2011-04-28 22:16:32 -05:00
|
|
|
s += "b";
|
2011-08-19 17:16:48 -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-08-19 17:16:48 -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);
|
|
|
|
}
|