Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js replace space with dash

// replaces space with '-'
str = str.replace(/ /g, "-");
// or
str = str.split(' ').join('-');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #replace #space #dash
ADD COMMENT
Topic
Name
5+5 =