Increases the blob to the size of the value in length and initializes the new space with the character specified in the pad parameter. The new space is always placed at the end of the existing blob data. The value in length must be greater than the current size of the blob or the method fails. You can use any standard notation in the pad parameter, including printable characters (“a”), hexadecimal notation (“0X40”), or octal notation (“\011”).
The extend() method does not place
a null character (\000) at the end of the blob.
If you intend to read the blob into a string
object, you must add a null to the end of the blob.
For example, after running the extend() method
on
my_blob
, add my_blob +=’\000’;
to
add the null character.
extend(int length, char pad);
Parameter |
Description |
---|---|
length |
Indicates how much to increase blob size. |
pad |
Character to use to initialize the new space. Enclose this character in single quotes. |
Integer. Returns the new blob size if successful, and 0 if failed.
blob my_blob;
my_blob = “abcdefg”;
my_blob.extend(15,’*’);
Pointer to object |
Object |
---|---|
|
|
|
|
|
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |