/src/test/run-pass/str-concat.rs

http://github.com/jruderman/rust · Rust · 11 lines · 7 code · 3 blank · 1 comment · 1 complexity · 1d54c9e27c7b60f9f5d9d9abb1d62102 MD5 · raw file

  1. // -*- rust -*-
  2. fn main() {
  3. let a: ~str = ~"hello";
  4. let b: ~str = ~"world";
  5. let s: ~str = a + b;
  6. log(debug, s);
  7. assert (s[9] == 'd' as u8);
  8. }