当前位置:首页>开发>正文

delphi 111 一句Delphi语句

2023-04-10 17:25:22 互联网 未知 开发

delphi 111 一句Delphi语句

一句Delphi语句

取得m字串中第10个字符开始,长度为5的子串

例如showmessage(copy(sssss1111111,3,6))结果显示为sss111
----------------------------------------------------
function Copy(S Index, Count: Integer): string
function Copy(S Index, Count: Integer): array

Description

S is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or sub array containing Count characters or elements starting at S[Index].

If Index is larger than the length of S, Copy returns an empty string or array.

If Count specifies more characters or array elements than are available, only the characters or elements from S[Index] to the end of S are returned.

Note: When S is a dynamic array, Copy can only be used as a parameter in a call to a procedure or function that expects an array parameter. That is, it acts like the Slice function when working with dynamic arrays.

最新文章

随便看看