deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

feat request: expose publicly `capitalizeWord` (or similar)

Open lowlighter opened this issue 1 year ago • 13 comments

Is your feature request related to a problem? Please describe.

Expose publicly capitalizeWord or something similar (maybe capitalize / ucfirst / titleCase / ...): https://github.com/denoland/deno_std/blob/22d3bda488f145b725fc1eaeee16922a97d88add/text/_util.ts#L9-L13

A lot of languages provides a ucfirst helper (e.g. php, perl, etc.) that capitalize the first letter of a string.

While this is trivial enough, it's often tedious to have to redefine this function in every project when needed

Describe the solution you'd like

Feature offered by std lib

Describe alternatives you've considered

Redefining this the capitalizeWord in own project

lowlighter avatar Jul 12 '24 04:07 lowlighter