Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

trim text after a certain word in js

var new_str = str.substring(0, str.indexOf("Example"));
 
PREVIOUS NEXT
Tagged: #trim #text #word #js
ADD COMMENT
Topic
Name
7+3 =