NAME ^

classes/perlstring.pmc - Perl String

DESCRIPTION ^

PerlString extends String to provide Perl-specific string behaviour. Note that the morph method comes from PerlScalar, not from String.

Methods ^

STRING *get_repr()

Returns pythons string repr (w/o any escaping, just single quotes around)

void set_integer_native(INTVAL value)

Morphs the string to a PerlInt and sets its value to value.

void set_number_native(FLOATVAL value)

Morphs the string to a PerlNum and sets its value to value.

void morph(INTVAL type)

Morphs the PerlString to the specified type.

void increment()

void decrement()

These two methods are partially implemented. They should provide Perl 5 like string increment/decrement.

PMC *get_pmc_keyed(PMC *key)

Returns the string value for SELF[key].


parrot