字符串截取 abcd;1我只要;号前面的abcd 请问这字符串怎样取出来?谢谢. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 先用 Pos 取得;号的位置,然后截取 var str,newstr:string;begin str:='abcd;1'; newstr:=copy(str,1,pos(';',str)-1);end; var newstr:string;begin newstr:=copy('abcd;1',1,pos(';','abcd;1')-1); showmessage(newstr);end; function Copy(S; Index, Count: Integer): string;function Copy(S; Index, Count: Integer): array; leftstr(str,length)本例length=4; Delphi编写windows应用程序,writeln函数不能使用 下拉列表框显示图形问题 为什么会could not obtain ole control window handle 软件再次公开测试,想要的留下EMAIL 求一文件查找函数 在delphi中怎样调用exe文件?(只给一个人) 一个表的人数统计问题.请教各位.不管怎样谢谢了. 这个自定义函数是什么意思 谁能帮我解释这段关于打印的代码? ORACLE 中日期存储 身在北京,找份兼职 !过往的老板 有小活可以找我,那位兄弟代码忙不过来也可以联系我!! field or method identifier expected错误
str,newstr:string;
begin
str:='abcd;1';
newstr:=copy(str,1,pos(';',str)-1);
end;
newstr:string;
begin
newstr:=copy('abcd;1',1,pos(';','abcd;1')-1);
showmessage(newstr);
end;
function Copy(S; Index, Count: Integer): array;
本例length=4;