textConvert
    Preparing search index...

    Function capitalize

    • Capitalizes only the first letter of a string, leaving the rest unchanged.

      Parameters

      • text: string

        A string to capitalize.

      Returns string

      The string with its first letter capitalized.

      capitalize('hello world'); // 'Hello world'
      capitalize('HELLO WORLD'); // 'HELLO WORLD'