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 lang‘s alphabet. lang should be a language
code such as "en" or "es", but can also be a
fully-qualified locale (such as from the $LANG environment
variable). In that instance the remainder of the string is ignored,
as this library doesn’t consider regional distinctions when
determining a default alphabet.
If lang is "C" an IpuzCharsetBuilder with the
English alphabet will be returned.
The full list of recognized alphabets can be accessed with
ipuz_get_charset_languages(). If lang is invalid or is not a
supported language then NULL will be returned.
Important
This returns the common alphabet of letters for a language as commonly found in word games. It is not exhaustive, and is not the canonical alphabet for the language.
As examples, the provided German alphabet does not include ß as that character is rarely included in word games. Conversely, the Italian alphabet includes the full set of Latin letters for loan words.
This function also does not consider digraphs as independent characters. As examples, both Dutch and Czech have digraphs commonly appearing in puzzles (IJ and CH respectively). They are not considered part of the alphabet, and should be handled independently.
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.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |
The return value can be NULL. |