79362755

Date: 2025-01-16 18:51:42
Score: 1
Natty:
Report link

This checks if string is not empty before extracting its first character and comparing it, case-insensitively, to "s" and avoid errors with empty strings.

words.removeIf(name -> !name.isEmpty() && name.substring(0, 1).equalsIgnoreCase("s"));
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sim