Function

IpuzCharsetBuildernew_for_language

Declaration [src]

IpuzCharsetBuilder*
ipuz_charset_builder_new_for_language (
  const char* lang
)

Description [src]

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.

If lang is “C” or unrecognized, this will default to the English alphabet.

Note

This returns the common alphabet of letters for a language and will not include digraphs as independent characters. As examples, Dutch will not include a separate ij digraph, despite the prevelance of IJ in Dutch puzzles.

Parameters

lang

Type: const char*

A language code, such as “en” or “es”

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: IpuzCharsetBuilder

A newly allocated IpuzCharsetBuilder, or NULL.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.