I need to make a function that verifies if the user writes his first and last name. It receives a string and returns a boolean. It returns true if the string has 2 names(first and last) and the first letter of each name has to be capitalized. I′ve been trying to make it but havent been able to do it, if anyone could help me i′d apreciate it. btw i′m doing this in kotlin.
edit: I forgot to mention that i can′t use .split()
See Question&Answers more detail:os