Keil Logo

_findlocale()

4.7 _findlocale()

Defined in rt_locale.h, _findlocale() searches a set of contiguous locale data blocks for the requested locale, and returns a pointer to that locale.

This function is not part of the C library standard, but the ARM® C library supports it as an extension.

Syntax

void const *_findlocale(void const *index, const char *name);
Where:
index
is a pointer to a set of locale data blocks that are contiguous in memory and that end with a terminating value (set by the LC_index_end macro).
name
is the name of the locale to find.

Usage

You can use _findlocale() as an optional helper function when defining your own locale setup.
The _get_lc_*() functions, for example, _get_lc_ctype(), are expected to return a pointer to a locale definition created using the assembler macros. If you only want to write one locale definition, you can write an implementation of _get_lc_ctype() that always returns the same pointer. However, if you want to use different locale definitions at runtime, then the _get_lc_*() functions have to be able to return a different data block depending on the name passed to them as an argument. _findlocale() provides an easy way to do this.

Returns

Returns a pointer to the requested data block.
Non-ConfidentialPDF file icon PDF versionARM DUI0378H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.