Skip to content
Matt Fichman edited this page Dec 20, 2012 · 14 revisions

Represents an immutable character string. New strings can be created via a substring or concatenation operation on an existing string.

@index(index Int) Char

Returns the character at index index. If the index refers to a location beyond the length of the string, then

@add(string String) String

Concatenates this string with 'string'.

@equal(string String) Bool

Returns true if this string is equal to 'string'.

@less(string String) Bool

Returns true if this string is lexically less than 'string'.

Returns the length of the string.

slice(begin Int, end Int) String

Returns a new string containing the elements starting at 'begin' and ending at the character before 'end'.

Returns a new string containing elements starting at the beginning of the string and ending at the character before 'end'.

suffix(begin Int) String

Return a new string containing elements starting at 'begin' and continuing to the end of this string.

Returns true if this string starts with the exact string specified by 'string'

Returns true if this string ends with the exact string specified by 'string'

Returns an uppercase version of this string.

Returns a lowercase version of this string.

int?() Int

Converts the string into an integer. If the string is not a valid number, then zero is returned.

Converts the float into an integer. If the float is not a valid number, then zero is returned.

Converts the string to a character by returning the first character in the string.

Returns the hash code for this string.

Returns an iterator over the characters in this string

No comment

No comment

Clone this wiki locally