zoukankan      html  css  js  c++  java
  • 繁體簡體相互轉化

    ublic partial class Common     {         /// <summary>         /// 繁簡轉換         /// </summary>         /// <param name="locale"></param>         /// <param name="dwMapFlags"></param>         /// <param name="lpSrcStr"></param>         /// <param name="cchSrc"></param>         /// <param name="lpDestStr"></param>         /// <param name="cchDest"></param>         /// <returns></returns>         [DllImport("kernel32", CharSet = CharSet.Auto, SetLastError = true)]         private static extern int LCMapString(int locale, int dwMapFlags, string lpSrcStr, int cchSrc, [Out] string lpDestStr, int cchDest);         private const int _LOCALESYSTEMDEFAULT = 0x0800;         private const int _LCMAPSIMPLIFIEDCHINESE = 0x02000000;         private const int _LCMAPTRADITIONALCHINESE = 0x04000000;

            /// <summary>         /// 繁轉簡         /// </summary>         /// <param name="argSource"></param>         /// <returns></returns>         public static string TranslateSimplified(string argSource)         {             var t = new String(' ', argSource.Length);             LCMapString(_LOCALESYSTEMDEFAULT, _LCMAPSIMPLIFIEDCHINESE, argSource, argSource.Length, t, argSource.Length);             return t;         }

            /// <summary>         /// 簡轉繁         /// </summary>         /// <param name="argSource"></param>         /// <returns></returns>         public static string TranslateTraditional(string argSource)         {             var t = new String(' ', argSource.Length);             LCMapString(_LOCALESYSTEMDEFAULT, _LCMAPTRADITIONALCHINESE, argSource, argSource.Length, t, argSource.Length);             return t;         }     }

  • 相关阅读:
    22、编译安装nginx及性能优化
    21、nginx之ngx_http_proxy_module模块
    20、nginx之ngx_http_upstream_module模块
    19、修改文件描述符
    8、负载均衡HAproxy部署
    6、负载均衡HAproxy介绍
    17、ansible配置管理
    18、通过yum命令只下载rpm包不安装
    16、编译安装ansible
    python余弦相似度
  • 原文地址:https://www.cnblogs.com/qhy1277/p/4686302.html
Copyright © 2011-2022 走看看