本文整理自网络,侵删。
function GetText(strtxt:string;iLen:integer):string;begin//先判断要截取的字符串最后一个字节的类型//如果为汉字的第一个字节则减(加)一位if ByteType(strtxt,iLen) = mbLeadByte then iLen := iLen - 1;result := copy(strtxt,1,iLen) + ’...‘;end;
相关阅读 >>
Delphi xe(indy10)tidbytes转ansistring的实现
Delphi 执行一个外部程序,当外部程序结束后言主程序立即响应
Delphi中的copy,delete,pos和leftstr,rightstr的用法
更多相关阅读请进入《Delphi》频道 >>