[英]How can copy 4 character from begining of string to end of string?
例如:
var
s:string;
begin
s:='Hello1234567';
end;
end.
如何从字符串4字节4字节中复制..例如showmessage('hell')和showmessage('o123')和showmessage('4567')?
为此使用Copy()
函数:
var
s: string;
begin
s := 'Hello1234567';
ShowMessage(Copy(s, 1, 4));
ShowMessage(Copy(s, 5, 4));
ShowMessage(Copy(s, 9, 4));
end;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.