@nevware21/ts-utils
    Preparing search index...

    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.

      A word is a run of any characters other than whitespace, punctuation and symbols (_ and - are separators), so non-ASCII letters are part of words. The separators are the punctuation and symbols of ASCII and Latin-1 (except ª²³µ¹º¼½¾) and of the General Punctuation (except the zero width non-joiner and joiner), Currency Symbols, Arrows to Miscellaneous Symbols and Arrows (except Enclosed Alphanumerics, eg. Ⓐ and ①, and the Dingbat numbers, eg. ❶) and CJK Symbols and Punctuation blocks, so the emoji of these blocks (eg. ©, ❤, ⭐ and ✅) are separators. All other characters (eg. supplementary plane emoji such as 😀, Letterlike Symbols such as ™, and fullwidth or non-Latin punctuation) are part of a word. 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

      0.9.0

      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."
      strLetterCase("café crème"); // "Café Crème"