Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Js last word in a string

String test =  "This is a sentence";
String lastWord = test.substring(test.lastIndexOf(" ")+1);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Js #word #string
ADD COMMENT
Topic
Name
3+3 =