search

Home  >  Q&A  >  body text

javascript - js gets the first letter of pinyin of Chinese characters

I am making a plug-in with a search function, and now I want to add some functions. For example: if you input the English letter b, you can also match Chinese characters whose pinyin begins with b. Please tell me how to achieve this. There should be a library for Chinese pinyin comparison or something

淡淡烟草味淡淡烟草味2750 days ago879

reply all(3)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-19 10:48:32

    It’s easy to do it with a matching library

    reply
    0
  • PHP中文网

    PHP中文网2017-05-19 10:48:32

    Backend implementation: http://blog.sina.com.cn/s/blo...
    Frontend implementation: https://github.com/liuxianan/...

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-19 10:48:32

    Find a third-party Chinese pinyin matching library.

    reply
    0
  • Cancelreply