ts-package-starter - v1.3.0
    Preparing search index...

    Function containsChinese

    • Check if a string contains any Chinese characters.

      Parameters

      • text: string

        The text to check

      Returns boolean

      true if the text contains at least one Chinese character

      containsChinese('Hello 世界'); // true
      containsChinese('Hello World'); // false
      containsChinese('中文'); // true