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

Name

SPVM::BlessedObject::String - SPVM string

Description

The object of the SPVM::BlessedObject::String class holds a SPVM string.

Usage

  my $string = $blessed_object_string->to_string;
  
  my $binary = $blessed_object_string->to_bin;

Instance Methods

to_string

  my $string = $blessed_object_string->to_string;

Returns a string decoded to Perl string using utf8::decode.

If the docoding fails, an exception is thrown.

to_bin

  my $binary = $blessed_object_string->to_bin;

Returns a string as a binary.

Operators

Overloads the following operators.

bool

  my $bool = !!$blessed_object_string;

Always true.

stringify

  my $string = "$blessed_object_string";

The alias for "to_string".

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License