Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

best way to split a single string containing 2 words into word1 and word2

Participant ,
Mar 16, 2011 Mar 16, 2011

Whats the best way to take a string containing 2 words and split it into 2 strings ?

eg. "red ferrari"

string1 "red"

string2 "ferrari"

TOPICS
Getting started
663
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 16, 2011 Mar 16, 2011

I'd use list functions.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 16, 2011 Mar 16, 2011

Something like ListFirst, ListLast ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 16, 2011 Mar 16, 2011

Erm yes, those are list functions.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 16, 2011 Mar 16, 2011
LATEST

If your list is always going to have exactly two words, then yes.  Otherwise it depends on your requierments.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources