Replaces data in the string object with data copied from a source, starting at the offset. The first character in the source is always at an offset of zero.
offsetCopy(string source, int offset);
Parameter |
Description |
---|---|
source |
Source from which to copy the data. This can be another string object or a literal, enclosed in double quotes. |
offset |
Location from which to begin copying data. The first character in a string or literal is always at offset zero. |
Integer. Returns 1 for success, and 0 for failure.
Pointer to object |
Object |
---|---|
|
|
string mystr;
string new_stuff;
mystr = “abcdefg”;
new_stuff = “123456789”;
mystr.offsetCopy(new_stuff, 3);
// mystr now contains "456789"
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |