NAME ^

src/string_primitives.c - String Primitives

DESCRIPTION ^

This file collects together all the functions that call into the ICU API.

Functions ^

void string_set_data_directory(const char *dir)

Set the directory where ICU finds its data files (encodings, locales, etc.).

void string_fill_from_buffer(Interp *interp, const void *buffer, UINTVAL len, const char *encoding_name, STRING *s)

Creates a Parrot string from an "external" buffer, converting from any supported encoding into Parrot string's internal format.

Character Property Functions ^

UINTVAL Parrot_char_digit_value(Interp *interp, UINTVAL character)

Returns the decimal digit value of the specified character if it is a decimal digit character. If not, then -1 is returned.

Note that as currently written, Parrot_char_digit_value() can correctly return the decimal digit value of characters for which Parrot_char_is_digit() returns false.

INTVAL Parrot_char_is_alnum(Interp *interp, UINTVAL character)

Returns whether the specified character is an alphanumeric character.

INTVAL Parrot_char_is_alpha(Interp *interp, UINTVAL character)

Returns whether the specified character is an letter character.

INTVAL Parrot_char_is_ascii(Interp *interp, UINTVAL character)

Returns whether the specified character is an ASCII character.

INTVAL Parrot_char_is_blank(Interp *interp, UINTVAL character)

Returns whether the specified character is a "blank" or "horizontal space", a character that visibly separates words on a line.

INTVAL Parrot_char_is_cntrl(Interp *interp, UINTVAL character)

Returns whether the specified character is a control character.

INTVAL Parrot_char_is_digit(Interp *interp, UINTVAL character)

Returns whether the specified character is a digit character.

INTVAL Parrot_char_is_graph(Interp *interp, UINTVAL character)

Returns whether the specified character is a a "graphic" character (printable, excluding spaces).

INTVAL Parrot_char_is_lower(Interp *interp, UINTVAL character)

Returns whether the specified character is a lowercase letter.

INTVAL Parrot_char_is_print(Interp *interp, UINTVAL character)

Returns whether the specified character is a printable character.

INTVAL Parrot_char_is_punct(Interp *interp, UINTVAL character)

Returns whether the specified character is a punctuation character.

INTVAL Parrot_char_is_space(Interp *interp, UINTVAL character)

INTVAL Parrot_char_is_UWhiteSpace(Interp *interp, UINTVAL character)

INTVAL Parrot_char_is_Whitespace(Interp *interp, UINTVAL character)

INTVAL Parrot_char_is_JavaSpaceChar(Interp *interp, UINTVAL character)

Returns whether the specified character is a space character.

INTVAL Parrot_char_is_upper(Interp *interp, UINTVAL character)

Returns whether the specified character is an uppercase character.

INTVAL Parrot_char_is_xdigit(Interp *interp, UINTVAL character)

Returns whether the specified character is a hexadecimal digit character.

SEE ALSO ^

include/parrot/string_primitives.h

include/parrot/string.h

src/string.c


parrot