Removes blob data, starting at location offset for a specified length, and places it into the blob or string destination, overwriting the contents of original destination blob. The first character in a blob is always at offset 0. If the offset plus the length is greater than the total length of the blob, or if the length is -1, the cut() method removes data from the offset position to the end of the blob.
cut(int offset, int length, {blob | string} destination);
Parameter |
Description |
---|---|
offset |
Starting location to remove data. The first character in a blob is always at offset 0. |
length |
Amount (number of characters) of data to remove. |
destination |
blob or string in which to place the data. |
Integer. Returns the length of data cut, if successful, and 0, if failed.
blob other_blob;
pb->cut(5, 20, &other_blob);
blob my_blob;
string new_stuff;
my_blob = “abcdefghijk”;
new_stuff = “newblob”;
my_blob.cut(4, -1, &new_stuff);
Pointer to object |
Object |
---|---|
|
|
|
|
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |