79295139

Date: 2024-12-19 17:35:03
Score: 0.5
Natty:
Report link

I find it still a bit convoluted. But that's the simplest one-liner I could come up with.

// Test if `s` starts with a digit (0..9)
if s.chars().next().map(|c| c.is_ascii_digit()).unwrap() {
    println!("It starts with a digit!");
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Olivier Lasne