Function strLetterCase

  • Convert the provided value to a Letter Cased string, where the start of each word is capitalized, all non-word character and spaces are retained. If the value is not a string it will be converted.

    Type Parameters

    • T

    Parameters

    • value: T

      The value to be converted to letter case

    Returns string

    The Letter Cased version of the provided value

    Since

    0.9.0

    Example

    strLetterCase(null);             // "Null"
    strLetterCase(undefined); // "Undefined"
    strLetterCase("hello darkness"); // "Hello Darkness"
    strLetterCase("hello_darkness"); // "Hello_Darkness"
    strLetterCase("_hello_darkness"); // "_Hello_Darkness"
    strLetterCase("hello darkness, my old friend."); // "Hello Darkness; // My Old Friend."