Mufaddal
Mufaddal

Reputation: 566

Check in JavaScript/jQuery if the string contains all Chinese Characters or Ends with a Chinese Character

As the Title suggests, I need javascript/jQuery that helps me to check if the string contains all Chinese Characters or Ends with a Chinese Character.

Any help is appreciated.

Upvotes: 0

Views: 921

Answers (1)

Mikhail Timofeev
Mikhail Timofeev

Reputation: 2169

i would try to do it like this:

  1. get the char codes of chinese charachters (probably here)
  2. go through the string with for-loop and get for each char the char code with your_string.charCodeAt(i)
  3. proof if the char code in the char codes of chinese charachters

Upvotes: 1

Related Questions