Go to the documentation of this file.
106 #ifndef U_HIDE_DEPRECATED_API
131 #endif // U_HIDE_DEPRECATED_API
217 #ifndef U_HIDE_DEPRECATED_API
236 const char* resourceKey,
251 #if U_SHOW_CPLUSPLUS_API
270 #ifndef U_HIDE_DEPRECATED_API
298 #ifndef U_HIDE_DEPRECATED_API
334 #ifndef U_HIDE_INTERNAL_API
353 const char* packageName,
354 const char* localeID,
429 char *dest, int32_t *length,
696 char *dest, int32_t *pLength,
789 char *dest, int32_t *pLength,
793 #if U_SHOW_CPLUSPLUS_API
void ures_resetIterator(UResourceBundle *resourceBundle)
Resets the internal context of a resource so that iteration starts from the first element.
@ URES_STRING
Resource type constant for 16-bit Unicode strings.
UResourceBundle * ures_open(const char *packageName, const char *locale, UErrorCode *status)
Opens a UResourceBundle, from which users can extract strings by using their corresponding keys.
@ URES_NONE
Resource type constant for "no resource".
UResourceBundle * ures_getByKey(const UResourceBundle *resourceBundle, const char *key, UResourceBundle *fillIn, UErrorCode *status)
Returns a resource in a given resource that has a given key.
Basic definitions for ICU, for both C and C++ APIs.
UResourceBundle * ures_getNextResource(UResourceBundle *resourceBundle, UResourceBundle *fillIn, UErrorCode *status)
Returns the next resource in a given resource or NULL if there are no more resources to iterate over.
int8_t UBool
The ICU boolean type.
const UChar * ures_getStringByIndex(const UResourceBundle *resourceBundle, int32_t indexS, int32_t *len, UErrorCode *status)
Returns the string in a given resource at the specified index.
struct UResourceBundle UResourceBundle
@ URES_INT
Resource type constant for a single 28-bit integer, interpreted as signed or unsigned by the ures_get...
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
UResourceBundle * ures_getByIndex(const UResourceBundle *resourceBundle, int32_t indexR, UResourceBundle *fillIn, UErrorCode *status)
Returns the resource in a given resource at the specified index.
const char * ures_getVersionNumber(const UResourceBundle *resourceBundle)
Return the version number associated with this ResourceBundle as a string.
UResType
Numeric constants for types of resource items.
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API
@ URES_BINARY
Resource type constant for binary data.
const char * ures_getUTF8String(const UResourceBundle *resB, char *dest, int32_t *length, UBool forceCopy, UErrorCode *status)
Returns a UTF-8 string from a string resource.
const UChar * ures_getNextString(UResourceBundle *resourceBundle, int32_t *len, const char **key, UErrorCode *status)
Returns the next string in a given resource or NULL if there are no more resources to iterate over.
@ URES_INT_VECTOR
Resource type constant for vectors of 32-bit integers.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UnicodeString ures_getUnicodeString(const UResourceBundle *resB, UErrorCode *status)
Returns the string value from a string resource bundle.
const char * ures_getUTF8StringByIndex(const UResourceBundle *resB, int32_t stringIndex, char *dest, int32_t *pLength, UBool forceCopy, UErrorCode *status)
Returns a UTF-8 string from a resource at the specified index.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
UEnumeration * ures_openAvailableLocales(const char *packageName, UErrorCode *status)
Create a string enumerator, owned by the caller, of all locales located within the specified resource...
#define TRUE
The TRUE value of a UBool.
const int32_t * ures_getIntVector(const UResourceBundle *resourceBundle, int32_t *len, UErrorCode *status)
Returns a 32 bit integer array from a resource.
@ URES_LIMIT
One more than the highest normal UResType value.
@ URES_ARRAY
Resource type constant for arrays of resources.
#define U_INTERNAL
This is used to declare a function as an internal ICU C API
UResourceBundle * ures_openDirect(const char *packageName, const char *locale, UErrorCode *status)
This function does not care what kind of localeID is passed in.
void ures_getVersion(const UResourceBundle *resB, UVersionInfo versionInfo)
Return the version number associated with this ResourceBundle as an UVersionInfo array.
const UChar * ures_getStringByKey(const UResourceBundle *resB, const char *key, int32_t *len, UErrorCode *status)
Returns a string in a given resource that has a given key.
UnicodeString ures_getUnicodeStringByKey(const UResourceBundle *resB, const char *key, UErrorCode *status)
Returns a string in a resource that has a given key.
uint32_t ures_getUInt(const UResourceBundle *resourceBundle, UErrorCode *status)
Returns an unsigned integer from a resource.
const char * ures_getLocaleByType(const UResourceBundle *resourceBundle, ULocDataLocaleType type, UErrorCode *status)
Return the name of the Locale associated with this ResourceBundle.
const uint8_t * ures_getBinary(const UResourceBundle *resourceBundle, int32_t *len, UErrorCode *status)
Returns a binary data from a binary resource.
void setToBogus()
Make this UnicodeString object invalid.
const char * ures_getUTF8StringByKey(const UResourceBundle *resB, const char *key, char *dest, int32_t *pLength, UBool forceCopy, UErrorCode *status)
Returns a UTF-8 string from a resource and a key.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
UnicodeString ures_getNextUnicodeString(UResourceBundle *resB, const char **key, UErrorCode *status)
Returns the next string in a resource, or an empty string if there are no more resources to iterate o...
@ URES_TABLE
Resource type constant for tables of key-value pairs.
#define U_SUCCESS(x)
Does the error code indicate success?
@ URES_ALIAS
Resource type constant for aliases; internally stores a string which identifies the actual resource s...
UBool ures_hasNext(const UResourceBundle *resourceBundle)
Checks whether the given resource has another element to iterate over.
void ures_close(UResourceBundle *resourceBundle)
Close a resource bundle, all pointers returned from the various ures_getXXX calls on this particular ...
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
UResourceBundle * ures_openU(const UChar *packageName, const char *locale, UErrorCode *status)
Same as ures_open() but takes a const UChar *path.
int32_t ures_getSize(const UResourceBundle *resourceBundle)
Returns the size of a resource.
void ures_openFillIn(UResourceBundle *r, const char *packageName, const char *localeID, UErrorCode *status)
Same as ures_open() but uses the fill-in parameter instead of allocating a bundle,...
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]
The binary form of a version on ICU APIs is an array of 4 uint8_t.
UnicodeString ures_getUnicodeStringByIndex(const UResourceBundle *resB, int32_t indexS, UErrorCode *status)
Returns the string in a given resource array or table at the specified index.
struct UEnumeration UEnumeration
structure representing an enumeration object instance
#define U_NAMESPACE_BEGIN
const UChar * ures_getString(const UResourceBundle *resourceBundle, int32_t *len, UErrorCode *status)
Returns a string from a string resource type.
int32_t ures_countArrayItems(const UResourceBundle *resourceBundle, const char *resourceKey, UErrorCode *err)
Returns the number of strings/arrays in resource bundles.
UResType ures_getType(const UResourceBundle *resourceBundle)
Returns the type of a resource.
const char * ures_getKey(const UResourceBundle *resourceBundle)
Returns the key associated with a given resource.
UnicodeString & setTo(const UnicodeString &srcText, int32_t srcStart)
Set the text in the UnicodeString object to the characters in srcText in the range [srcStart,...
int32_t ures_getInt(const UResourceBundle *resourceBundle, UErrorCode *status)
Returns a signed integer from a resource.
const char * ures_getLocale(const UResourceBundle *resourceBundle, UErrorCode *status)
Return the name of the Locale associated with this ResourceBundle.