tft每日頭條

 > 知識

 > asp.net字符串判斷

asp.net字符串判斷

知識 更新时间:2024-07-08 15:21:54
1.應用場景
  • 将漢字轉換為拼音(eg:"我愛你"———>"WOAINI")
  • 取各個漢字的首字母(eg:"我是中國人"———>"WSZGR")
2.涉及到的組件
  • 組件1:ToolGood.Words【我實際的就是這種】
  1. 組件名稱:ToolGood.Words
  2. nuget地址:
  3. github地址【提示:500多個star】
3.關鍵代碼

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ToolGood.Words; namespace PinYinXiangGuan { class Program { static void Main(string[] args) { while (true) { var name = Console.ReadLine(); if (string.IsNullOrEmpty(name)) { break; } //獲取漢字的首字母 Console.WriteLine(WordsHelper.GetFirstPinYin(name)); } } } }

4.關鍵代碼截圖

asp.net字符串判斷(Asp.net中漢字轉換成為拼音)1

5.如果有其他好的組件推薦,歡迎各位大佬補充,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关知識资讯推荐

热门知識资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved