If x
have number 3 return true
or false
fn solution(x: i32) -> bool {
x.to_string().chars().any(|x| x == '3')
}
// Add your tests here.
// See https://doc.rust-lang.org/stable/rust-by-example/testing/unit_testing.html
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_add() {
assert_eq!(solution(525458), false);
assert_eq!(solution(2222), false);
assert_eq!(solution(354523), true)
}
}