duplocale(3)

duplocale3

Duplicate existing locale

Usage

#include <xlocale.h>

locale_t

duplocale(locale_t loc);

Overview

Duplicates an existing locale_t. Sub-structures are shared between the two locale_t structures. Passing NULL will duplicate the current locale. Passing LC_GLOBAL_LOCALE will duplicate the global locale.

Return values

Returns a duplicated locale_t, or NULL on error. Duplicated locales should be freed with freelocale(3).

Releases

135 releases since Mac OS X 10.4; the text changed 1 time.

  1. 10.4–10.4.11
  2. 10.5–26.5

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.