JSPM

@tomzio/rust-pinyin

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9980F
  • License MIT OR Apache-2.0

Change chinese sentence to pinyin initials

Package Exports

  • @tomzio/rust-pinyin
  • @tomzio/rust-pinyin/rust_pinyin.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tomzio/rust-pinyin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rust-pinyin

Change chinese sentence to pinyin initials

将汉字转成拼音首字母,用于自动完成的快捷拼音输入

Installation

Add this to your Cargo.toml:

[dependencies]
rust-pinyin = "0.1"

How to use:

use rust_pinyin::get_pinyin;

assert_eq!("kjpysr123abc", get_pinyin("快捷拼音输入123abc"));
assert_eq!("amxlklwsjp", get_pinyin("阿莫西林克拉维酸钾片"));
assert_eq!("aboddka.kbddcd", get_pinyin("ABO滴度(抗A.抗B滴度测定)"));
assert_eq!("pttzsy", get_pinyin("葡萄糖注射夜"));