Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript slice string from character

var input = 'john smith~123 Street~Apt 4~New York~NY~12345';

var fields = input.split('~');

var name = fields[0];
var street = fields[1];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #slice #string #character
ADD COMMENT
Topic
Name
6+4 =