Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

capitalize each word from string in react

text.replace(/(^w|sw)(S*)/g, (_,m1,m2) => m1.toUpperCase()+m2.toLowerCase())
Comment

PREVIOUS NEXT
Code Example
Javascript :: head component nextjs 
Javascript :: react js docker 
Javascript :: regex char or char 
Javascript :: how to delete object properties in javascript 
Javascript :: add color to attribute using jquery 
Javascript :: nodejs postgresql local connection 
Javascript :: js start at this character 
Javascript :: javascript import class 
Javascript :: module.exports multiple functions 
Javascript :: knex.js migration create 
Javascript :: js get screen width 
Javascript :: remove all parameters from url javascript 
Javascript :: accessing nested objects in javascript 
Javascript :: js array .filter 
Javascript :: express and node 
Javascript :: swr data fetching 
Javascript :: then and catch in promise 
Javascript :: react get route params 
Javascript :: js get class from instance 
Javascript :: Factorial Recursion Function in Javascript 
Javascript :: tricky javascript interview questions 
Javascript :: How to return arguments in an array in javascript 
Javascript :: javascript string new line 
Javascript :: javascript tostring 
Javascript :: ng select2 angular dropdown 
Javascript :: date to string format javascript 
Javascript :: how to import in react js 
Javascript :: how to add footer in every page jspdf 
Javascript :: remove from string javascript regex 
Javascript :: nuxt get client windows size 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =