| parrotcode: src/charset/ascii.c | |
| Contents | C |

src/charset/ascii.c

This file implements the charset functions for ascii data and common charset functionality for similar charsets like iso-8859-1.
STRING *ascii_get_graphemessource_string,
starting at offset and ending at offset + count.static void set_graphemessource_string,
starting at offset.
Replace replace_count graphemes with those from STRING insert_string.STRING *ascii_get_graphemes_inplacesource_string,
starting at offset.
Retrieves count graphemes and puts them into dest_string.static STRING *to_asciisrc to ASCII in STRING dest.
Throws an exception if unconvertable UNICODE characters are involved.static STRING *to_unicodesrc to UNICODE STRING dest.static STRING *to_charsetsrc to ASCII charset STRING dest.static STRING *composestatic STRING *decomposestatic void upcasesource_string to all uppercase.static void downcasesource_string to all lower-case.static void titlecasesource_string to title case,
where the first character is upper case and all the rest of the characters are lower-case.static void upcase_firstsource_string to upper case,
but doesn't modify the rest of the string.static void downcase_firstsource_string to lowercase,
but doesn't modify the rest of the characters.static void titlecase_firstsource_string to upper case,
but doesn't modify the rest of the string.INTVAL ascii_comparelhs > rhs,
returns 1.
If lhs == rhs returns 0.
If STRING lhs < rhs,
returns -1.INTVAL mixed_cs_indexsearch in STRING src.
returns the position where the substring is found if it is indeed found.
Returns -1 otherwise.
Operates on different types of strings,
not just ASCII.INTVAL ascii_cs_indexsearch in STRING src.
returns the position where the substring is found if it is indeed found.
Returns -1 otherwise.INTVAL ascii_cs_rindexsearch_string in STRING source_string.
Starts searching at offset.static UINTVAL validatestatic STRING *string_from_codepointcodepoint.
Returns the new STRING.static INTVAL is_cclassstatic INTVAL find_cclassstatic INTVAL find_not_cclasssize_t ascii_compute_hashsource_string starting with seed value seed.const CHARSET *Parrot_charset_ascii_initSTRING *charset_cvt_ascii_to_binarysrc to a binary STRING dest.STRING *charset_cvt_ascii_to_iso_8859_1src to ISO8859-1 STRING dest.
|
|
|