NAME ^

pmc/luastring.pmc - Lua String

DESCRIPTION ^

LuaString extends LuaAny to provide a class with the behaviour of the Lua String type.

Overloaded Methods ^

void init()
Initializes the string.
PMC *instantiate_str(STRING *rep, INTVAL flags)
Allow :
    .const .LuaString s = "Hello World!"
void mark()
Marks the string as live.
PMC *clone()
Creates a copy of the string.
STRING *get_string()
Returns the string itself.
STRING *name()
Return the string "string".
void set_integer_native(INTVAL value)
void set_number_native(FLOATVAL value)
VOID set_string_native(STRING *value)
Sets the value of the string to that of the specified string.
VOID set_pmc(PMC *value)
Sets the value of the string to the string value of the specified PMC.
PMC *neg(PMC *dest)
void i_neg()
INTVAL elements()
Return length of the string.
void freeze(visit_info *info)
Used to archive the string.
void thaw(visit_info *info)
Used to unarchive the string.

non-Vtable Methods ^

PMC *add(PMC *value, PMC *dest)
void i_add(PMC *value)
PMC *subtract(PMC *value, PMC *dest)
void i_subtract(PMC *value)
PMC *multiply(PMC *value, PMC *dest)
void i_multiply(PMC *value)
PMC *divide(PMC *value, PMC *dest)
void i_divide(PMC *value)
PMC *modulus(PMC *value, PMC *dest)
void i_modulus(PMC *value)
PMC *pow(PMC *value, PMC *dest)
void i_pow(PMC *value)
INTVAL is_equal(PMC *value)
Compares the string with value; returns true if they match.
INTVAL cmp(PMC *value)
Compares the string with value; returns -1 if the string is smaller, 0 if they are equal, and 1 if value is smaller.Throws an exception unless value is a LuaString.
PMC *concatenate(PMC *value, PMC *dest)
void i_concatenate(PMC *value)

Specific Methods ^

PMC *get_metatable()
PMC *len()
PMC *rawequal(PMC *value)
PMC *tonumber()
PMC *tobase(INTVAL base)


parrot