NEWLOCALE(3) | MidnightBSD Library Functions Manual | NEWLOCALE(3) |
newlocale
—
Creates a new locale
Standard C Library (libc, -lc)
#include
<locale.h>
locale_t
newlocale
(int
mask, const char *
locale, locale_t
base);
Creates a new locale, inheriting some properties from an existing
locale. The mask defines the components that the new
locale will have set to the locale with the name specified in the
locale parameter. Any components not specified in
mask will be inherited from the locale referenced by
base, if base is not
NULL
. If the call is successful, the state of the
locale referenced by base is unspecified, and it must
not be accessed. The special locale LC_GLOBAL_LOCALE
may not be specified for base. The
mask is either LC_ALL_MASK,
indicating all possible locale components, or the logical OR of some
combination of the following:
Returns a new, valid, locale_t or NULL if an error occurs. You must free the returned locale with freelocale(3).
duplocale(3), freelocale(3), localeconv(3), querylocale(3), uselocale(3), xlocale(3)
This function conforms to IEEE Std 1003.1-2008 (“POSIX.1”).
October 2, 2020 | midnightbsd-3.1 |