function trac(source:widestring;count:integer):widestring;
var
I : Integer ;
temp_s : string ;begin
temp_s := '';
for I := 1 to count do
temp_s := temp_s + string(source)[i];
if (ord(string(temp_s)[count]) >256 ) and (ord(string(temp_s)[count-1]) <256 )then
delete(temp_s,count,1);
trac := temp_s ;end ;
var
I : Integer ;
temp_s : string ;begin
temp_s := '';
for I := 1 to count do
temp_s := temp_s + string(source)[i];
if (ord(string(temp_s)[count]) >256 ) and (ord(string(temp_s)[count-1]) <256 )then
delete(temp_s,count,1);
trac := temp_s ;end ;
解决方案 »
- Delphi如何实现打印 PPT 文件?
- DLL中使用回调函数
- FASTREPORT 3.0打印问题,我不能直接打印,非要预览一次,后续打印才有反应
- 针对开发人员的软件工程平台,寻找合作成员
- 在使用中出现如下错误,请帮助Vendor initialization failed.File: GDS32.DLLAlias: IBLocal
- 结束软件行业,最后再来一次CSDN,顺便一次性把分放完
- 我该用什么数据集控件?
- 能否截取隐藏窗口的图像?
- ado连接oracle的问题
- click一个dbgrid的某一cell时,如何得到鼠标点在这个cell上的相对位置。
- 如何将ClientDataSet中的Data输出生成Excel或Html文件?
- 为了学习多层数据库,我安装了Win2000server,但是服务器要如何配置?我没用过server.帮我一把,我是菜鸟。
var
s:string;
begin
result := source;
s:=source[count];
if s>#127 then
result := copy(source,1,count-1);
end;
var
Str: AnsiString ;
begin
Str := Copy(AnsiString(source), 1, count);
if Ord(Str[Length(Str)])>127 then
Result := Copy(Str, 1, Length(Str) - 1)
else
Result := Str;
end;
var
str: string;
begin
str := string(source);
SetLength(str,count);
result := widestring(str);
end;