Package org.lwjgl.system.libc
Class LibCLocale
- java.lang.Object
-
- org.lwjgl.system.libc.LibCLocale
-
public class LibCLocale extends java.lang.ObjectNative bindings to locale.h.
-
-
Field Summary
Fields Modifier and Type Field Description static intLC_ALLSelects the entire C locale.static intLC_COLLATESelects the collation category of the C locale.static intLC_CTYPESelects the character classification category of the C locale.static intLC_MONETARYSelects the monetary formatting category of the C locale.static intLC_NUMERICSelects the numeric formatting category of the C locale.static intLC_TIMESelects the time formatting category of the C locale.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longnsetlocale(int category, long locale)Unsafe version of:setlocale(int, java.nio.ByteBuffer)static java.lang.Stringsetlocale(int category, java.lang.CharSequence locale)Gets and sets the current C locale.static java.lang.Stringsetlocale(int category, java.nio.ByteBuffer locale)Gets and sets the current C locale.
-
-
-
Field Detail
-
LC_ALL
Selects the entire C locale.
-
LC_COLLATE
Selects the collation category of the C locale.
-
LC_CTYPE
Selects the character classification category of the C locale.
-
LC_MONETARY
Selects the monetary formatting category of the C locale.
-
LC_NUMERIC
Selects the numeric formatting category of the C locale.
-
LC_TIME
Selects the time formatting category of the C locale.
-
-
Method Detail
-
nsetlocale
public static long nsetlocale(int category, long locale)Unsafe version of:setlocale(int, java.nio.ByteBuffer)
-
setlocale
@Nullable public static java.lang.String setlocale(int category, java.nio.ByteBuffer locale) @Nullable public static java.lang.String setlocale(int category, java.lang.CharSequence locale)Gets and sets the current C locale.The
setlocalefunction installs the specified system locale or its portion as the new C locale. The modifications remain in effect and influences the execution of all locale-sensitive C library functions until the next call tosetlocale. Iflocaleis a null pointer,setlocalequeries the current C locale without modifying it.- Parameters:
category- the locale category identifier, may by null. One of:LC_ALLLC_COLLATELC_CTYPELC_MONETARYLC_NUMERICLC_TIMElocale- system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale.- Returns:
- a pointer to a narrow null-terminated string identifying the C locale after applying the changes, if any, or null pointer on failure.
A copy of the returned string along with the category used in this call to
setlocalemay be used later in the program to restore the locale back to the state at the end of this call.
-
-