Capitalizes the first letter of a string.
✅ Works in Node.js, React, and React Native.
The input string to capitalize
A new string with the first letter capitalized
capitalize("hello world") // "Hello world"capitalize("WORLD") // "WORLD"capitalize("") // "" Copy
capitalize("hello world") // "Hello world"capitalize("WORLD") // "WORLD"capitalize("") // ""
Generated using TypeDoc
Capitalizes the first letter of a string.
✅ Works in Node.js, React, and React Native.