def get_first_letter(char):
char=char.encode('GBK')
if char<b"\xb0\xa1" or char>b"\xd7\xf9":
return ""
if char<b"\xb0\xc4":
return "a"
if char<b"\xb2\xc0":
return "b"
if char<b"\xb4\xed":
return "c"
if char<b"\xb6\xe9":
return "d"
if char<b"\xb7\xa1":
return "e"
if char<b"\xb8\xc0":
return "f"
if char<b"\xb9\xfd":
return "g"
if char<b"\xbb\xf6":
return "h"
if char<b"\xbf\xa5":
return "j"
if char<b"\xc0\xab":
return "k"
if char<b"\xc2\xe7":
return "l"
if char<b"\xc4\xc2":
return "m"
if char<b"\xc5\xb5":
return "n"
if char<b"\xc5\xbd":
return "o"
if char<b"\xc6\xd9":
return "p"
if char<b"\xc8\xba":
return "q"
if char<b"\xc8\xf5":
return "r"
if char<b"\xcb\xf9":
return "s"
if char<b"\xcd\xd9":
return "t"
if char<b"\xce\xf3":
return "w"
if char<b"\xd1\x88":
return "x"
if char<b"\xd4\xd0":
return "y"
if char<b"\xd7\xf9":
return "z"
热门文章更多>>
标签更多>>
专题更多>>
最新文章更多>>
- 团队城市未满足要求:MSBuildTools12.0_x86_Path 存在
- 使用 MSBuild.exe 在发布模式下构建 C# 解决方案
- 当我发布 Web 应用程序时,AfterPublish 脚本不运行
- 构建时 T4 转换的产品仅在下一个构建中使用
- ASP.NET Core Application (.NET Framework) for Windows x64 only error in project.assets.json
- 新的 .csproj 格式 - 如何将整个目录指定为“链接文件"到子目录?
- 如何将条件编译符号(DefineConstants)传递给 msbuild
- MSBuild 支持 Visual Studio 2017 RTM 中的 T4 模板
- NuGet 包还原找不到包,没有源
- 使用 C# 6.0 功能运行 TFS 构建
据说名字很长很长的人都是闲的蛋疼