Function textSplitCase

  • 按照普遍的特殊字符分割字符串

    Parameters

    • str: string

      字符串

    Returns string[]

    textSplitCase('foo-bar'); /// ['foo', 'bar']
    textSplitCase('foo_bar'); /// ['foo', 'bar']
    textSplitCase('foo bar'); /// ['foo', 'bar']
    textSplitCase('foo.bar'); /// ['foo', 'bar']
    textSplitCase('fooBar'); /// ['foo', 'bar']
    textSplitCase('foo-Bar'); /// ['foo', 'bar']