Struct

IpuzCharsetBuilder

Description

struct IpuzCharsetBuilder {
  /* No available fields */
}
No description available.

Constructors

ipuz_charset_builder_new

Returns an empty builder for a character set. Use ipuz_charset_builder_add_text() to populate it. Once it’s populated, use ipuz_charset_builder_build() to create an IpuzCharset.

ipuz_charset_builder_new_for_language

Creates a charset builder with a list of all characters in common use in crosswords for langs alphabet. lang should be a country code, but can be a fully-qualified locale (such as from the $LANG environment variable). In that instance the remainder of the string is ignored, as we don’t consider regional distinctions when determining a default alphabet. Along those lines, a lang of “C” will return the English alphabet.

ipuz_charset_builder_new_from_text

Returns an IpuzCharsetBuilder prepopulated with the characters from text.

Instance methods

ipuz_charset_builder_add_character

Adds c to the builder.

ipuz_charset_builder_add_text

Adds each unicode code point from text into self.

ipuz_charset_builder_build

Consumes builder and frees it, and returns an immutable IpuzCharset. The resulting charset can be queried efficiently for character counts and such.

ipuz_charset_builder_ref
No description available.

ipuz_charset_builder_remove_text

Tries to remove all the characters in text from self, i.e. decrease its character counts by as many instances of each character there are in text. If text contains characters that are not already in the self, or if text contains more of a certain character than self already has, this function returns FALSE and leaves the self unchanged.

ipuz_charset_builder_set_char_count

Explicitly sets the count of c to be count in self.

ipuz_charset_builder_unref
No description available.