79289072

Date: 2024-12-17 19:01:06
Score: 2.5
Natty:
Report link

Meu Código

String getFirstNome() {
String lastName = "";
String firstName = "";
if (nome!.split("\\w+").length >= 1) {
  firstName = nome!.substring(0, nome!.indexOf(" "));
  lastName = nome!.substring(nome!.lastIndexOf(" ") + 1);
  return firstName + lastName;
} else {
  firstName = nome.toString();
}
return firstName;

}

Reasons:
  • Blacklisted phrase (2): Código
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: George Freire