Function pinyin(ByVal mystr As String, Optional types As Byte = 0) As String
Dim temp   As String, i As Long, j As Long, a, b
With CreateObject("Scripting.Dictionary")
.Add "a", "-20319"
.Add "ai", "-20317"
.Add "an", "-20304"
.Add "ang", "-20295"
.Add "ao", "-20292"
.Add "ba", "-20283"
.Add "bai", "-20265"
.Add "ban", "-20257"
.Add "bang", "-20242"
.Add "bao", "-20230"
.Add "bei", "-20051"
.Add "ben", "-20036"
.Add "beng", "-20032"
.Add "bi", "-20026"
.Add "bian", "-20002"
.Add "biao", "-19990"
.Add "bie", "-19986"
.Add "bin", "-19982"
.Add "bing", "-19976"
.Add "bo", "-19805"
.Add "bu", "-19784"
.Add "ca", "-19775"
.Add "cai", "-19774"
.Add "can", "-19763"
.Add "cang", "-19756"
.Add "cao", "-19751"
.Add "ce", "-19746"
.Add "ceng", "-19741"
.Add "cha", "-19739"
.Add "chai", "-19728"
.Add "chan", "-19725"
.Add "chang", "-19715"
.Add "chao", "-19540"
.Add "che", "-19531"
.Add "chen", "-19525"
.Add "cheng", "-19515"
.Add "chi", "-19500"
.Add "chong", "-19484"
.Add "chou", "-19479"
.Add "chu", "-19467"
.Add "chuai", "-19289"
.Add "chuan", "-19288"
.Add "chuang", "-19281"
.Add "chui", "-19275"
.Add "chun", "-19270"
.Add "chuo", "-19263"
.Add "ci", "-19261"
.Add "cong", "-19249"
.Add "cou", "-19243"
.Add "cu", "-19242"
.Add "cuan", "-19238"
.Add "cui", "-19235"
.Add "cun", "-19227"
.Add "cuo", "-19224"
.Add "da", "-19218"
.Add "dai", "-19212"
.Add "dan", "-19038"
.Add "dang", "-19023"
.Add "dao", "-19018"
.Add "de", "-19006"
.Add "deng", "-19003"
.Add "di", "-18996"
.Add "dian", "-18977"
.Add "diao", "-18961"
.Add "die", "-18952"
.Add "ding", "-18783"
.Add "diu", "-18774"
.Add "dong", "-18773"
.Add "dou", "-18763"
.Add "du", "-18756"
.Add "duan", "-18741"
.Add "dui", "-18735"
.Add "dun", "-18731"
.Add "duo", "-18722"
.Add "e", "-18710"
.Add "en", "-18697"
.Add "er", "-18696"
.Add "fa", "-18526"
.Add "fan", "-18518"
.Add "fang", "-18501"
.Add "fei", "-18490"
.Add "fen", "-18478"
.Add "feng", "-18463"
.Add "fo", "-18448"
.Add "fou", "-18447"
.Add "fu", "-18446"
.Add "ga", "-18239"
.Add "gai", "-18237"
.Add "gan", "-18231"
.Add "gang", "-18220"
.Add "gao", "-18211"
.Add "ge", "-18201"
.Add "gei", "-18184"
.Add "gen", "-18183"
.Add "geng", "-18181"
.Add "gong", "-18012"
.Add "gou", "-17997"
.Add "gu", "-17988"
.Add "gua", "-17970"
.Add "guai", "-17964"
.Add "guan", "-17961"
.Add "guang", "-17950"
.Add "gui", "-17947"
.Add "gun", "-17931"
.Add "guo", "-17928"
.Add "ha", "-17922"
.Add "hai", "-17759"
.Add "han", "-17752"
.Add "hang", "-17733"
.Add "hao", "-17730"
.Add "he", "-17721"
.Add "hei", "-17703"
.Add "hen", "-17701"
.Add "heng", "-17697"
.Add "hong", "-17692"
.Add "hou", "-17683"
.Add "hu", "-17676"
.Add "hua", "-17496"
.Add "huai", "-17487"
.Add "huan", "-17482"
.Add "huang", "-17468"
.Add "hui", "-17454"
.Add "hun", "-17433"
.Add "huo", "-17427"
.Add "ji", "-17417"
.Add "jia", "-17202"
.Add "jian", "-17185"
.Add "jiang", "-16983"
.Add "jiao", "-16970"
.Add "jie", "-16942"
.Add "jin", "-16915"
.Add "jing", "-16733"
.Add "jiong", "-16708"
.Add "jiu", "-16706"
.Add "ju", "-16689"
.Add "juan", "-16664"
.Add "jue", "-16657"
.Add "jun", "-16647"
.Add "ka", "-16474"
.Add "kai", "-16470"
.Add "kan", "-16465"
.Add "kang", "-16459"
.Add "kao", "-16452"
.Add "ke", "-16448"
.Add "ken", "-16433"
.Add "keng", "-16429"
.Add "kong", "-16427"
.Add "kou", "-16423"
.Add "ku", "-16419"
.Add "kua", "-16412"
.Add "kuai", "-16407"
.Add "kuan", "-16403"
.Add "kuang", "-16401"
.Add "kui", "-16393"
.Add "kun", "-16220"
.Add "kuo", "-16216"
.Add "la", "-16212"
.Add "lai", "-16205"
.Add "lan", "-16202"
.Add "lang", "-16187"
.Add "lao", "-16180"
.Add "le", "-16171"
.Add "lei", "-16169"
.Add "leng", "-16158"
.Add "li", "-16155"
.Add "lia", "-15959"
.Add "lian", "-15958"
.Add "liang", "-15944"
.Add "liao", "-15933"
.Add "lie", "-15920"
.Add "lin", "-15915"
.Add "ling", "-15903"
.Add "liu", "-15889"
.Add "long", "-15878"
.Add "lou", "-15707"
.Add "lu", "-15701"
.Add "lv", "-15681"
.Add "luan", "-15667"
.Add "lue", "-15661"
.Add "lun", "-15659"
.Add "luo", "-15652"
.Add "ma", "-15640"
.Add "mai", "-15631"
.Add "man", "-15625"
.Add "mang", "-15454"
.Add "mao", "-15448"
.Add "me", "-15436"
.Add "mei", "-15435"
.Add "men", "-15419"
.Add "meng", "-15416"
.Add "mi", "-15408"
.Add "mian", "-15394"
.Add "miao", "-15385"
.Add "mie", "-15377"
.Add "min", "-15375"
.Add "ming", "-15369"
.Add "miu", "-15363"
.Add "mo", "-15362"
.Add "mou", "-15183"
.Add "mu", "-15180"
.Add "na", "-15165"
.Add "nai", "-15158"
.Add "nan", "-15153"
.Add "nang", "-15150"
.Add "nao", "-15149"
.Add "ne", "-15144"
.Add "nei", "-15143"
.Add "nen", "-15141"
.Add "neng", "-15140"
.Add "ni", "-15139"
.Add "nian", "-15128"
.Add "niang", "-15121"
.Add "niao", "-15119"
.Add "nie", "-15117"
.Add "nin", "-15110"
.Add "ning", "-15109"
.Add "niu", "-14941"
.Add "nong", "-14937"
.Add "nu", "-14933"
.Add "nv", "-14930"
.Add "nuan", "-14929"
.Add "nue", "-14928"
.Add "nuo", "-14926"
.Add "o", "-14922"
.Add "ou", "-14921"
.Add "pa", "-14914"
.Add "pai", "-14908"
.Add "pan", "-14902"
.Add "pang", "-14894"
.Add "pao", "-14889"
.Add "pei", "-14882"
.Add "pen", "-14873"
.Add "peng", "-14871"
.Add "pi", "-14857"
.Add "pian", "-14678"
.Add "piao", "-14674"
.Add "pie", "-14670"
.Add "pin", "-14668"
.Add "ping", "-14663"
.Add "po", "-14654"
.Add "pu", "-14645"
.Add "qi", "-14630"
.Add "qia", "-14594"
.Add "qian", "-14429"
.Add "qiang", "-14407"
.Add "qiao", "-14399"
.Add "qie", "-14384"
.Add "qin", "-14379"
.Add "qing", "-14368"
.Add "qiong", "-14355"
.Add "qiu", "-14353"
.Add "qu", "-14345"
.Add "quan", "-14170"
.Add "que", "-14159"
.Add "qun", "-14151"
.Add "ran", "-14149"
.Add "rang", "-14145"
.Add "rao", "-14140"
.Add "re", "-14137"
.Add "ren", "-14135"
.Add "reng", "-14125"
.Add "ri", "-14123"
.Add "rong", "-14122"
.Add "rou", "-14112"
.Add "ru", "-14109"
.Add "ruan", "-14099"
.Add "rui", "-14097"
.Add "run", "-14094"
.Add "ruo", "-14092"
.Add "sa", "-14090"
.Add "sai", "-14087"
.Add "san", "-14083"
.Add "sang", "-13917"
.Add "sao", "-13914"
.Add "se", "-13910"
.Add "sen", "-13907"
.Add "seng", "-13906"
.Add "sha", "-13905"
.Add "shai", "-13896"
.Add "shan", "-13894"
.Add "shang", "-13878"
.Add "shao", "-13870"
.Add "she", "-13859"
.Add "shen", "-13847"
.Add "sheng", "-13831"
.Add "shi", "-13658"
.Add "shou", "-13611"
.Add "shu", "-13601"
.Add "shua", "-13406"
.Add "shuai", "-13404"
.Add "shuan", "-13400"
.Add "shuang", "-13398"
.Add "shui", "-13395"
.Add "shun", "-13391"
.Add "shuo", "-13387"
.Add "si", "-13383"
.Add "song", "-13367"
.Add "sou", "-13359"
.Add "su", "-13356"
.Add "suan", "-13343"
.Add "sui", "-13340"
.Add "sun", "-13329"
.Add "suo", "-13326"
.Add "ta", "-13318"
.Add "tai", "-13147"
.Add "tan", "-13138"
.Add "tang", "-13120"
.Add "tao", "-13107"
.Add "te", "-13096"
.Add "teng", "-13095"
.Add "ti", "-13091"
.Add "tian", "-13076"
.Add "tiao", "-13068"
.Add "tie", "-13063"
.Add "ting", "-13060"
.Add "tong", "-12888"
.Add "tou", "-12875"
.Add "tu", "-12871"
.Add "tuan", "-12860"
.Add "tui", "-12858"
.Add "tun", "-12852"
.Add "tuo", "-12849"
.Add "wa", "-12838"
.Add "wai", "-12831"
.Add "wan", "-12829"
.Add "wang", "-12812"
.Add "wei", "-12802"
.Add "wen", "-12607"
.Add "weng", "-12597"
.Add "wo", "-12594"
.Add "wu", "-12585"
.Add "xi", "-12556"
.Add "xia", "-12359"
.Add "xian", "-12346"
.Add "xiang", "-12320"
.Add "xiao", "-12300"
.Add "xie", "-12120"
.Add "xin", "-12099"
.Add "xing", "-12089"
.Add "xiong", "-12074"
.Add "xiu", "-12067"
.Add "xu", "-12058"
.Add "xuan", "-12039"
.Add "xue", "-11867"
.Add "xun", "-11861"
.Add "ya", "-11847"
.Add "yan", "-11831"
.Add "yang", "-11798"
.Add "yao", "-11781"
.Add "ye", "-11604"
.Add "yi", "-11589"
.Add "yin", "-11536"
.Add "ying", "-11358"
.Add "yo", "-11340"
.Add "yong", "-11339"
.Add "you", "-11324"
.Add "yu", "-11303"
.Add "yuan", "-11097"
.Add "yue", "-11077"
.Add "yun", "-11067"
.Add "za", "-11055"
.Add "zai", "-11052"
.Add "zan", "-11045"
.Add "zang", "-11041"
.Add "zao", "-11038"
.Add "ze", "-11024"
.Add "zei", "-11020"
.Add "zen", "-11019"
.Add "zeng", "-11018"
.Add "zha", "-11014"
.Add "zhai", "-10838"
.Add "zhan", "-10832"
.Add "zhang", "-10815"
.Add "zhao", "-10800"
.Add "zhe", "-10790"
.Add "zhen", "-10780"
.Add "zheng", "-10764"
.Add "zhi", "-10587"
.Add "zhong", "-10544"
.Add "zhou", "-10533"
.Add "zhu", "-10519"
.Add "zhua", "-10331"
.Add "zhuai", "-10329"
.Add "zhuan", "-10328"
.Add "zhuang", "-10322"
.Add "zhui", "-10315"
.Add "zhun", "-10309"
.Add "zhuo", "-10307"
.Add "zi", "-10296"
.Add "zong", "-10281"
.Add "zou", "-10274"
.Add "zu", "-10270"
.Add "zuan", "-10262"
.Add "zui", "-10260"
.Add "zun", "-10256"
.Add "zuo", "-10254"
a = .Keys
b = .Items
End With
For i = 1 To Len(mystr)
For j = UBound(a) - 1 To 0 Step -1
If Val(b(j)) <= Asc(Mid(mystr, i, 1)) Then Exit For
Next
temp = temp & IIf(types, UCase(Left(a(j), 1)), " " & a(j))
Next
pinyin = Trim(temp)
End Function

hanzi 全拼音 qu de的更多相关文章

  1. JS实现获取汉字首字母拼音、全拼音及混拼音的方法

    本文实例讲述了JS实现获取汉字首字母拼音.全拼音及混拼音的方法.分享给大家供大家参考,具体如下: 这里需要用到一个js获取汉字拼音的插件,可点击此处本站下载. 运行效果如下: 完整示例代码: ? 1 ...

  2. qu de hanzi 首字母

    Function hztopy(hzpy As String) As StringDim hzstring As String, pystring As StringDim hzpysum As In ...

  3. 汉字转全拼音函数优化方案(SQLServer),值得你看看

    函数要求实现功能 select 函数名 ('你好,我是追索') 返回的结果(ni hao , wo shi zhui suo) 解决方案一: 解决方案一 /* 根据汉字获取全拼 1.生成所有读音临时表 ...

  4. c#获取文字全拼音

    class Program { /// <summary> /// 获得拼音 /// </summary> /// <param name="str_Spell ...

  5. 【转】SQLServer汉字转全拼音函数

    USE Test go IF OBJECT_ID('Fn_GetQuanPin','Fn') IS NOT NULL DROP FUNCTION fn_GetQuanPin go create fun ...

  6. oracle汉字转拼音(获得全拼/拼音首字母/拼音截取等)

        oracle汉字转拼音(获得全拼/拼音首字母/拼音截取等)   效果如下: Oracle 字符集 GBK 没有问题 , UTF -8 需要修改一下   Sql代码   --oracle汉字转拼 ...

  7. PHP的UTF-8中文转拼音处理类(性能已优化至极致)

    <?php /** * PHP 汉字转拼音 * @author Jerryli(hzjerry@gmail.com) * @version V0.20140715 * @package SPFW ...

  8. php 获取中文的拼音

    注意事项: 无法识别的中文 亳:bo,如果有此字,结果为空,调用此类之前需要手动加判断 蚌:bang,beng,多音字 莞:guan 圳:zhen 儋:dan 漯:luo 濮:pu 泸:lu 衢:qu ...

  9. 关于C++对汉字拼音的处理

    直到目前我没有找到比较合适的输入汉字输出拼音的函数,那么根据网上流传的几个源码进行了改编,写成了输入汉字输出拼音的函数.对于此函数不能说强大,但是至少稳定可用,输出结果还没有发现什么错误. 那么下面我 ...

随机推荐

  1. Java中的日期(Calendar、Date)

    (1)获取当前日期: java.util.Calendar calendar = java.util.Calendar.getInstance(); 或  = new java.util.Gregor ...

  2. Codeforces Round #510 #C Array Product

    http://codeforces.com/contest/1042/problem/C 给你一个有n个元素序列,有两个操作:1,选取a[i]和a[j],删除a[i],将$a[i]*a[j]$赋值给a ...

  3. HDU-2018-奶牛的故事

    这题找到递推式就好写了,递推式大致是: f=n (n<=4) f=f(n-1)+f(n-3) (n>4) 其实这题的题意,我觉得是有很大的问题的,它前后说的每年年初的意思都不一样,敬请参考 ...

  4. 如何用纯 CSS 绘制一个充满动感的 Vue logo

    效果预览 在线演示 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/zaqKPx 可交互视频教 ...

  5. jquery如何获取手机网页触屏坐标:ontouchstart 、ontouchend、ontouchmove

    function handleTouchEvent(event) { //只跟踪一次触摸 ) { var output = document.getElementById("output&q ...

  6. ZOJ 2058 The Archaeologist's Trouble II(贪心+模拟)

    [题目大意] 一个n高的塔,由@ * ?三种字符组成.每行相邻两个字符不能相邻. '?' 表示未确定是 '@' 还是 '*' . 求'@' 可能出现的最多和最少次数. [分析] 在可以填的情况下 先填 ...

  7. eclipse去除js(JavaScript)验证错误

    第一步: 去除eclipse的JS验证: 将windows->preference->Java Script->Validator->Errors/Warnings-> ...

  8. JQuery中xxx is not a function或者can not find $

    在项目中,遇到以上两个错误,反复折腾了好久,js代码写得没有问题,jquery的文件也引入了,就是反复的报告错误,xxx is not a function.如图: 就是这样的错误,shake is ...

  9. Java-在一个包装器对象中包装一个原始类型

    使用基本类型的包装对象,好处可以为空且可以序列化 package com.tj; public class MyClass2 { public static void main(String[] ar ...

  10. python-selenium使用send_keys()方法写中文报错的解决方法

    问题描述: 自动化操作页面,输入中文姓名: # coding=utf-8 url = "http://dealer.bitauto.com/50002218/zuidijia/" ...