@pengzhanbo/utils - v3.4.1
    Preparing search index...

    Function titleCase

    • Converts a string to Title Case (first letter of each word capitalized)

      将字符串转换为 Title Case(每个单词的首字母大写)

      Parameters

      • str: string

        The string to convert. 要转换的字符串

      Returns string

      The string in Title Case. Title Case 格式的字符串

      titleCase('hello world') // => 'Hello World'
      titleCase('foo-bar') // => 'Foo Bar'
      titleCase('fooBarBaz') // => 'Foo Bar Baz'