Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created June 25, 2019 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/7f1be9483b137e11ee6ba012b77b6b2e to your computer and use it in GitHub Desktop.
Save rust-play/7f1be9483b137e11ee6ba012b77b6b2e to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn main() {
let lines = "привет\nмир\nhello\nworld".lines();
for (linenumber, line) in lines.enumerate() {
println!("{}: {}", linenumber, line);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment