TinyPinyin.Core
0.1.0
请升级到 TinyPinyin,可直接兼容 .Net Framework、.Net Standard、.Net 5/6
dotnet add package TinyPinyin.Core --version 0.1.0
NuGet\Install-Package TinyPinyin.Core -Version 0.1.0
<PackageReference Include="TinyPinyin.Core" Version="0.1.0" />
<PackageVersion Include="TinyPinyin.Core" Version="0.1.0" />
<PackageReference Include="TinyPinyin.Core" />
paket add TinyPinyin.Core --version 0.1.0
#r "nuget: TinyPinyin.Core, 0.1.0"
#addin nuget:?package=TinyPinyin.Core&version=0.1.0
#tool nuget:?package=TinyPinyin.Core&version=0.1.0
适用于.Net平台的快速、低内存占用的汉字转拼音库。
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
0.1.0 | 16,127 | 5/26/2017 |
特性
生成的拼音不包含声调,均为大写
执行效率高
低内存占用
支持获取简码(拼音首字母)
使用
只提供足够简洁的API,简单易用。
/// <summary>
/// 获取单个字符的拼音
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
string PinyinHelper.GetPinyin(char c)
/// <summary>
/// 获取文本字符串的拼音,允许设定拼音分割符
/// </summary>
/// <param name="text">要获取拼音的文本</param>
/// <param name="separator">拼音分割符,默认空格</param>
/// <returns></returns>
string PinyinHelper.GetPinyin(string text, string separator = " ")
/// <summary>
/// 判断单个字符是否是中文
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
bool IsChinese(char c)