Struct

IpuzCharset

Description [src]

struct IpuzCharset {
  /* No available fields */
}

An opaque data structure that stores an ordered count of unicode characters.

Functions

ipuz_charset_deserialize

Creates a new character set by deserializing from a string.

Instance methods

ipuz_charset_check_text

Checks to see if all the characters in text are contained within self. This can be used to quickly assertain if a character is valid to be used within a puzzle.

ipuz_charset_compare

Compares two charsets to see if they have exactly the same contents.

ipuz_charset_get_char_count

Returns the count of c. If c is not in self, then 0 is returned.

ipuz_charset_get_char_index

Returns the index of c.

ipuz_charset_get_n_chars

Returns the number of different types of characters stored in self. This is a constant-time operation.

ipuz_charset_get_size

Returns the total number of characters stored in self. Unlike ipuz_charset_get_n_chars() which returns the number of types of characters, this returns the count of characters.

ipuz_charset_iter_first

Gets an iterator for querying the charset. The first value can be queried with ipuz_charset_iter_get_value(). Note that the iterator must be allowed to terminate by running it until ipuz_charset_iter_next() returns NULL; that last iteration will free the IpuzCharsetIter.

ipuz_charset_ref

Refs the character set.

ipuz_charset_serialize

Concatenates all the unique characters stored in self, in the order in which they would be returned by ipuz_charset_get_char_index().

ipuz_charset_unref

Unrefs a character set, which will be freed when the reference count becomes 0.