Copy functionReturns a substring of a string or a segment of a dynamic array.UnitSystemCategorystring handling routinesfunction Copy(S; Index, Count: Integer): string;
function Copy(S; Index, Count: Integer): array;DescriptionS is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or subarray containing Count characters or elements starting at S[Index]. The substring or subarray is a unique copy (that is, it does not share memory with S, although if the elements of the array are pointers or objects, these are not copied as well.)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, you can omit the Index and Count parameters and Copy copies the entire array.
function Copy(S; Index, Count: Integer): array;DescriptionS is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or subarray containing Count characters or elements starting at S[Index]. The substring or subarray is a unique copy (that is, it does not share memory with S, although if the elements of the array are pointers or objects, these are not copied as well.)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, you can omit the Index and Count parameters and Copy copies the entire array.
解决方案 »
- 一个很郁闷的问题,在线等答案!!!
- 关于VCL接口引用计数的问题, 高手请进
- ListView组件CheckBox功能的实现?
- 请问在哪儿能找到TMemo控件源码
- 怎样判断TADOQuery中的某一行是否被选中?
- 昨天发了个贴子,今天我想查看有无回应,可是找不到我的贴子,请提供方法。
- 浏览器上的滚动条怎么去掉呀?
- 请教关于类似QQ用户注册的问题?Up有分。
- 我在定义ole自动化对象的时候出现了问题
- A是个FORM窗口,有一个dj函数procedure TFormDz17.dj();,B是一个类,A调用B,B里如何调用A里的dj?
- 关于这个SQL语句应该怎样写更简单?
- 如何修改ie里的打开网页的后的默认网页
如果原来的字符串是‘123456789’
那么经过上面你的函数转换一下就是‘56789’
function Copy(S; Index, Count: Integer): string;
S:就是传递进来的字符串
index: 就是你打算从的几个字符开始拷贝
count:就是你要拷贝几个字符
你知道在C++Builder中有没有类似的函数,为什么我在C++Builder中总是找不到这个函数