Our application is the names of companies using Twitter to log in.
Twitter provides full names on one line.
Examples
1. "Froederick Frankenstien" 2. "Ludwig Van Beethoven" 3. "Anne Frank"
I would like to split the string into two vars ( first and last ) based on the first found " " (space).
Example First Name Last Name 1 Froederick Frankenstein 2 Ludwig Van Beethoven 3 Anne Frank
I am familiar with String#split , but I'm not sure how to split only once. The most responsive answer from Ruby-Way ™ (elegant) will be accepted.
string split ruby
naomik Mar 09 2018-11-11T00: 00Z
source share