前段时间公司人员反应OA里的汉字拼音首字母不准他们又要用,没办法自己就从网上搜有没有好的,看了很多都是首字母拼不出来或有些字母变为另一个,但最后找了很多还是有一个好用的,暂未发现有不准的. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace O.Common { /// <summary> /// 汉字转拼音 /// </summary> pu…
asp.net 汉字转拼音 需求背景: 昨天遇到个问题,就是面对系统中集中性的要设置大批量的用户设置默认的用户名,密码,权限(角色),同时要求用户名是姓名的全拼,回头看看旁边那个哥们撸胳膊挽袖子准备一个个手动去设置,我眼角不自觉的抽了抽,因为这次需要设置的客户账户只是一百来人,那手动录入完手也得抽筋,何况后续还有八百多号用户要录入,想不通为什么一直没有人提出这个需求.作为一个天天本着每行代码都是奔着去改变世界的程序员来说,这个耍帅的机会怎么能错过,牛逼哄哄的告诉旁边那个哥们,“这活我来...”,…
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://w…
using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; namespace CommonClass.Util { /// <summary> /// 汉字转拼音类 /// </summary> public class PinYin { private static readonly int[] PyValue = new int…