delphi之字符串截取

如:000043213000   截取后:432130

delphi 代码:

var ii:integer;

    svalue:varchar(255);

 sPatientId:='000043213000';

sValue := Copy(sPatientId, 1, 10) ;

      for ii:=1 to Length(sValue) do
         begin
           if sValue[ii]<>'0' then
           begin
             Break;
           end;
         end;
    sValue:= Copy(sValue, ii, 10-ii+1);

 

 

 

posted @ 2012-02-24 18:08  用智慧点亮人生  阅读(455)  评论(0编辑  收藏  举报