Link to home
Start Free TrialLog in
Avatar of Meinhoonaa
Meinhoonaa

asked on

how do i get a substring without predefined length

UserName = John Doe

I just want to retrieve only first name.
Avatar of p_davis
p_davis

you can use the split method of the string class and split on the " " (space) and it returns a string array then you can just retrieve the 0 index of the array for the first name
ASKER CERTIFIED SOLUTION
Avatar of p_davis
p_davis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Meinhoonaa

ASKER

sample please
^^

 =)