The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SPVM::StringBuffer - StringBuffer in SPVM | String buffer

SYNOPSYS

  use StringBuffer;
  
  # new
  my $buffer = StringBuffer->new;
  
  # push string
  $buffer->push("abc");
  $buffer->push("def");
  
  # Convert to string - abcdef
  my $string = $buffer->to_string;
  

DESCRIPTION

String buffer.

CLASS METHODS

new

  static method new : StringBuffer ()

Create new StringBuffer object.

INSTANCE METHODS

length

  method length : int ()

Get the string length.

push

  method push  : void ($string : string)

Push a string to the string buffer.

push_char

  method push_char : void ($char : byte)

Push a character to the string buffer.

to_string

  method to_string : string ()

Convert the string buffer to a string.