博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
简体中文与繁体中文的转换函数
阅读量:7096 次
发布时间:2019-06-28

本文共 867 字,大约阅读时间需要 2 分钟。

  hot3.png

unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, StdCtrls;type  TForm1 = class(TForm)    Button1: TButton;    procedure Button1Click(Sender: TObject);  end;var  Form1: TForm1;implementation{$R *.dfm}function GB2Big(GB: string): string;var  Len: Integer;begin  Len := Length(GB);  SetLength(Result, Len);  LCMapString(GetUserDefaultLCID, LCMAP_TRADITIONAL_CHINESE, PChar(GB), Len, PChar(Result), Len);end;function Big2GB(Big: string): string;var  Len: Integer;begin  Len := Length(Big);  SetLength(Result, Len);  LCMapString(GetUserDefaultLCID, LCMAP_SIMPLIFIED_CHINESE, PChar(Big), Len, PChar(Result), Len);end;{调用测试}procedure TForm1.Button1Click(Sender: TObject);begin  ShowMessage(GB2Big('汉字繁简转换')); {漢字繁簡轉換}  ShowMessage(Big2GB('漢字繁簡轉換')); {汉字繁简转换}end;end.

转载于:https://my.oschina.net/hermer/blog/319605

你可能感兴趣的文章
函数入门
查看>>
关于automatic_Panoramic_Image_Stitching_using_Invariant_features 的阅读笔记(2)
查看>>
django 学习-2 模板
查看>>
项目管理-方法工具
查看>>
转:一个优秀windows C++程序员的知识体系
查看>>
mongodb副本集设置优先级
查看>>
关联容器
查看>>
〖Android〗Android源代码所有目录生成的Target(编译生成文件反查)
查看>>
应用 Valgrind 发现 Linux 程序的内存问题
查看>>
android 获取前台进程
查看>>
蓝桥杯单片机比赛模板
查看>>
面向对象(构造函数)
查看>>
电脑双屏下如何设置程序在第二屏幕运行
查看>>
【数据挖掘基础算法】KNN最近邻分类算法
查看>>
hihoCoder #1055 : 刷油漆 [ 树形dp ]
查看>>
leetcode 2. Add Two Numbers
查看>>
CentOS系统中常用查看日志命令
查看>>
iOS - AppRealTest App 真机测试
查看>>
Python--day32--复习:https和http的区别;黏包;黏包问题的解决方式;
查看>>
jQuery 遍历
查看>>