blob: d3e51ff7f2dda2575e78cda4e08554dbc40d91a3 (
plain)
1
2
3
4
5
6
7
8
9
10
|
fn main() {
println!("Hello, world!");
}
struct Solution {}
impl Solution {
pub fn length_of_last_word(s: String) -> i32 {
s.split_whitespace().last().unwrap().len() as i32
}
}
|