📜  如何用空格分割字符串 rust 代码示例

📅  最后修改于: 2022-03-11 14:49:25.184000             🧑  作者: Mango

代码示例1
let mut iter = "A few words".split_whitespace();

assert_eq!(Some("A"), iter.next());
assert_eq!(Some("few"), iter.next());
assert_eq!(Some("words"), iter.next());

assert_eq!(None, iter.next());