Could someone please tell me how to determine only the first name from an edittext that contains a first and last name? I've only managed to do the opposite with IndexOf and SubString. Thanks.
That was a simple and quick solution, but yes, you will have to validate the existence of a First and Last Name, like this:
B4X:
If EditText1.Text.IndexOf(" ") > -1 Then
FirstName = EditText1.Text.SubString2(0, EditText1.Text.IndexOf(" "))
Msgbox("First Name is " & FirstName, "")
End If
Of course you can make this code more robust as needed.