Top Description Fields Constructors Methods
org.lwjgl.system.libc

public Class LibCLocale

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Native bindings to locale.h.

Field Summary

Modifier and TypeField and Description
public static final int
LC_ALL

Selects the entire C locale.

public static final int
LC_COLLATE

Selects the collation category of the C locale.

public static final int
LC_CTYPE

Selects the character classification category of the C locale.

public static final int
LC_MONETARY

Selects the monetary formatting category of the C locale.

public static final int
LC_NUMERIC

Selects the numeric formatting category of the C locale.

public static final int
LC_TIME

Selects the time formatting category of the C locale.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private static native int
private static native int
private static native int
private static native int
private static native int
private static native int
public static native long
nsetlocale(int category, long locale)

Unsafe version of: setlocale

public static String

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 setlocale may be used later in the program to restore the locale back to the state at the end of this call.

setlocale
(int
the locale category identifier, may by null. One of:
LC_ALLLC_COLLATELC_CTYPELC_MONETARYLC_NUMERICLC_TIME
category
,
ByteBuffer
system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale.
locale
)

Gets and sets the current C locale.

public static String

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 setlocale may be used later in the program to restore the locale back to the state at the end of this call.

setlocale
(int
the locale category identifier, may by null. One of:
LC_ALLLC_COLLATELC_CTYPELC_MONETARYLC_NUMERICLC_TIME
category
,
CharSequence
system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale.
locale
)

Gets and sets the current C locale.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LC_ALLback to summary
public static final int LC_ALL

Selects the entire C locale.

LC_COLLATEback to summary
public static final int LC_COLLATE

Selects the collation category of the C locale.

LC_CTYPEback to summary
public static final int LC_CTYPE

Selects the character classification category of the C locale.

LC_MONETARYback to summary
public static final int LC_MONETARY

Selects the monetary formatting category of the C locale.

LC_NUMERICback to summary
public static final int LC_NUMERIC

Selects the numeric formatting category of the C locale.

LC_TIMEback to summary
public static final int LC_TIME

Selects the time formatting category of the C locale.

Constructor Detail

LibCLocaleback to summary
protected LibCLocale()

Method Detail

LC_ALLback to summary
private static native int LC_ALL()
LC_COLLATEback to summary
private static native int LC_COLLATE()
LC_CTYPEback to summary
private static native int LC_CTYPE()
LC_MONETARYback to summary
private static native int LC_MONETARY()
LC_NUMERICback to summary
private static native int LC_NUMERIC()
LC_TIMEback to summary
private static native int LC_TIME()
nsetlocaleback to summary
public static native long nsetlocale(int category, long locale)

Unsafe version of: setlocale

setlocaleback to summary
public static String setlocale(int category, ByteBuffer locale)

Gets and sets the current C locale.

The setlocale function 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 to setlocale. If locale is a null pointer, setlocale queries the current C locale without modifying it.

Parameters
category:int

the locale category identifier, may by null. One of:

LC_ALLLC_COLLATELC_CTYPELC_MONETARYLC_NUMERICLC_TIME
locale:ByteBuffer

system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale.

Returns:String

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 setlocale may be used later in the program to restore the locale back to the state at the end of this call.

Annotations
@Nullable
@NativeType:char *
setlocaleback to summary
public static String setlocale(int category, CharSequence locale)

Gets and sets the current C locale.

The setlocale function 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 to setlocale. If locale is a null pointer, setlocale queries the current C locale without modifying it.

Parameters
category:int

the locale category identifier, may by null. One of:

LC_ALLLC_COLLATELC_CTYPELC_MONETARYLC_NUMERICLC_TIME
locale:CharSequence

system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale.

Returns:String

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 setlocale may be used later in the program to restore the locale back to the state at the end of this call.

Annotations
@Nullable
@NativeType:char *