zoukankan      html  css  js  c++  java
  • 汉字转换拼音/五笔 帮助类

       /// <summary>
        /// 汉字转换拼音/五笔 帮助类
        /// </summary>
        public static class ChsHelper
        {
            private static readonly ChsToLetter ChsToLetter;
            static ChsHelper()
            {
                if (ChsToLetter == null)
                {
                    ChsToLetter = new ChsToLetter();
                }
            }
    
            /// <summary>
            /// 获取汉字转义拼音字符串
            /// </summary>
            /// <param name="strValue"></param>
            /// <param name="isUp">默认大写</param>
            /// <param name="full">默认缩写</param>
            /// <returns></returns>
            public static string ConvertToPy(this string strValue, bool isUp = true, bool full = false)
            {
                return ChsToLetter.GetPY(strValue, isUp, full);
            }
    
            /// <summary>
            /// 获取汉字转五笔字符串
            /// </summary>
            /// <param name="strValue"></param>
            /// <param name="isUp">默认大写</param>
            /// <param name="full">默认缩写</param>
            /// <returns></returns>
            public static string ConvertToWb(this string strValue, bool isUp = true, bool full = false)
            {
                return ChsToLetter.GetWB(strValue, isUp, full);
            }
        }

    引用  ChsHelper.dll

  • 相关阅读:
    iframe跨域
    changePage() 页面跳转
    APACHE启动失败是SYSTEM对apache目录没权限导致
    git使用中出现的错误
    python面试总结
    python面试30-40题
    python面试1-30题
    购物车的基本流程
    vue的基础知识
    三大框架的对比
  • 原文地址:https://www.cnblogs.com/shiruina/p/9359787.html
Copyright © 2011-2022 走看看