1 How do I convert X to Y? Int to string Use ToStr. let x: int = 42; let y: ~str = x.to_str(); String to int Use FromStr, and its helper function, from_str. let x: Option<int> = from_str("42"); let y: int = x.unwrap(); Int to string, in non-base-10 Use ToStrRadix. use std::num::ToStrRadix; let x: int = 42; let y: ~str = x.to_str_radix(16); String to int, in non-base-10 Use FromStrRadix, and its he
{{#tags}}- {{label}}
{{/tags}}