Answers for "find capital letter in string react js"

0

react capitalize first letter

// I think the best way is to do it using styles (it will work for any UI framework)
// JS
<Text class="capitalize-me">sometext</Text>
// CSS
.capitalize-me::first-letter {
  text-transform: capitalize;
}
Posted by: Guest on September-03-2021
0

capitalize each word from string in react

text.replace(/(^\w|\s\w)(\S*)/g, (_,m1,m2) => m1.toUpperCase()+m2.toLowerCase())
Posted by: Guest on October-06-2021

Code answers related to "find capital letter in string react js"

Browse Popular Code Answers by Language