Capitalize the first letter of a string.
capitalize("hello") // "Hello" Copy
capitalize("hello") // "Hello"
capitalize("hello my Friend", true) // "Hello my friend" Copy
capitalize("hello my Friend", true) // "Hello my friend"
capitalize("hello my Friend", false) // "Hello my Friend" Copy
capitalize("hello my Friend", false) // "Hello my Friend"
source string
Optional
should the rest of the string be forced to lowercase?
Capitalize the first letter of a string.
Example
Example
Example