Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE int32_t U_EXPORT2 uldn_keyValueDisplayName ( const ULocaleDisplayNames ldn,
const char *  key,
const char *  value,
UChar result,
int32_t  maxResultSize,
UErrorCode pErrorCode 

Returns the display name of the provided value (used with the provided key).

ldnthe LocaleDisplayNames instance
keythe locale key
valuethe locale key's value
resultreceives the display name
maxResultSizethe size of the result buffer
pErrorCodethe status code
the actual buffer size needed for the display name. If it's greater than maxResultSize, the returned name will be truncated. ICU 4.4

Definition at line 675 of file locdspnm.cpp.

References UnicodeString::extract(), U_FAILURE, and U_ILLEGAL_ARGUMENT_ERROR.

  if (U_FAILURE(*pErrorCode)) {
    return 0;
  if (ldn == NULL || key == NULL || value == NULL || (result == NULL && maxResultSize > 0)
      || maxResultSize < 0) {
    return 0;
  UnicodeString temp(result, 0, maxResultSize);
  ((const LocaleDisplayNames *)ldn)->keyValueDisplayName(key, value, temp);
  return temp.extract(result, maxResultSize, *pErrorCode);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index