Our application is mining names from people using Twitter to login.
Twitter is providing full names in a single string.
Examples
1. "Froederick Frankenstien"
2. "Ludwig Van Beethoven"
3. "Anne Frank"
I’d like to split the string into only two vars (first and last) based on the first " " (space) found.
Example First Name Last Name
1 Froederick Frankenstein
2 Ludwig Van Beethoven
3 Anne Frank
I’m familiar with String#split but I’m not sure how to only split once. The most Ruby-Way™ (elegant) answer will be accepted.
String#split takes a second argument, the limit.
should do the trick.