NAME
SPVM::StringBuffer - String buffer
SYNOPSYS
use SPVM::StringBuffer;
# new
my $buffer = SPVM::StringBuffer->new;
# push string
$buffer->push("abc");
$buffer->push("def");
# Convert to string - abcdef
my $string = $buffer->to_string;
DESCRIPTION
String buffer.
STATIC METHODS
new
sub new : SPVM::StringBuffer ()
Create new SPVM::StringBuffer object.
INSTANCE METHODS
length
sub length : int ($self : self)
Get the string length.
push
sub push : void ($self : self, $string : string)
Push a string to the string buffer.
push_char
sub push_char : void ($self : self, $char : byte)
Push a character to the string buffer.
to_string
sub to_string : string ($self : self)
Convert the string buffer to a string.