Implements a mutable sequence of characters
A string buffer can be initialized with a string value and a capacity (length). The methods provided by the class are able to change the buffer, by expanding and collapsing it, reading, changing or inserting characters.
Located in /core/text/StringBuffer.class.php (line 43)
PHP2Go | --StringBuffer
Class constructor
If $initStr and $initCapacity are missing, the initial capacity of the buffer will be 16 chars.
Appends a value in the end of the buffer
Get current buffer capacity
Read a char from the buffer, given its index
Removes a substring from the buffer
Removes a char from the buffer
Checks if the current buffer capacity is greater than a given lower bound
If $minimum is an integer value greater than zero, the buffer capacity will be set as the max value between $minimum and the double of the current capacity plus 2.
Get a substring of the buffer and copy to a given variable
The chars between $srcBegin and $srcEnd positions are copied to the $dst variable. Optionally, a position in the target variable can be provided through the $dstBegin argument.
Get the index of the first occurence of a substring in the buffer
Returns -1 when the substring is not found.
Inserts a value in a given index of the buffer
Get the index of the last occurence of a substring in the buffer
Returns -1 if the substring is not present in the buffer.
Get current buffer length
Inverts the buffer contents
Changes a given position of the buffer
Changes the length of the buffer
If the new length is greater than the current length, a sequence of "\x00" chars is used to fill the buffer. If it is lower, the buffer content is truncated.
Get a substring from the buffer, starting at $start and ending at $end
Returns NULL if one or both limits are invalid.
Get a substring from the buffer, starting at $start
Returns NULL if $start is lower than 0 or greater than the buffer length.
Converts the buffer into a regular string value
Inherited From PHP2Go
PHP2Go::PHP2Go()
PHP2Go::equals()
PHP2Go::generateUniqueId()
PHP2Go::getClassName()
PHP2Go::getConfigVal()
PHP2Go::getLangVal()
PHP2Go::getObjectName()
PHP2Go::getParentName()
PHP2Go::hasDestructor()
PHP2Go::hashCode()
PHP2Go::isA()
PHP2Go::isSubclassOf()
PHP2Go::logError()
PHP2Go::raiseError()
PHP2Go::registerDestructor()
PHP2Go::registerShutdownFunc()
PHP2Go::retrieve()
PHP2Go::store()
PHP2Go::__toString()
Documentation generated on Sun, 07 Oct 2007 19:29:52 -0300 by phpDocumentor 1.3.2