[英]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.