Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Captalize all words first letter javascript

function ucwords(str,force){
  str=force ? str.toLowerCase() : str;  
  return str.replace(/()([a-zA-Z])/g,
           function(firstLetter){
              return   firstLetter.toUpperCase();
           });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Captalize #words #letter #javascript
ADD COMMENT
Topic
Name
8+2 =