clear-af.js
    Preparing search index...

    Function capitalize

    • Function

      Capitalize the first character of a string

      Parameters

      • str: string

        The string to capitalize

      Returns string

      The string with the first character in uppercase

      capitalize("hello");        // "Hello"
      capitalize("hello world"); // "Hello world"
      capitalize(""); // ""