DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Split string on the first white space occurrence
str.substr(0,str.indexOf(' ')); // "72" str.substr(str.indexOf(' ')+1); // "tocirah sneab"
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Split
#string
#white
#space
#occurrence
ADD COMMENT
Topic
COMMENT
Name
7+3 =
Submit