Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ufmt_cmn.h File Reference

Go to the source code of this file.

Compounds

union  ufmt_args

Typedefs

typedef union ufmt_args ufmt_args

Enumerations

enum  {
  ufmt_count, ufmt_int, ufmt_char, ufmt_wchar,
  ufmt_string, ufmt_wstring, ufmt_pointer, ufmt_float,
  ufmt_double, ufmt_date, ufmt_uchar, ufmt_ustring,
  ufmt_last
}
 Enum representing the possible argument types for uprintf/uscanf. More...


Functions

int ufmt_digitvalue (UChar c)
 Convert a UChar in a some radix to an integer value. More...

UBool ufmt_isdigit (UChar c, int32_t radix)
 Determine if a UChar is a digit for a specified radix. More...

void ufmt_ltou (UChar *buffer, int32_t *len, long value, int32_t radix, UBool uselower, int32_t minDigits)
 Convert a long to a UChar* in a specified radix. More...

long ufmt_utol (const UChar *buffer, int32_t *len, int32_t radix)
 Convert a UChar* in a specified radix to a long. More...

UBool ufmt_isws (UChar c)
 Determine if a UChar is a whitespace character. More...

UCharufmt_defaultCPToUnicode (const char *s, int32_t len)
 Convert a string from the default codepage to Unicode. More...

char* ufmt_unicodeToDefaultCP (const UChar *s, int32_t len)
 Convert a string from the Unicode to the default codepage. More...


Typedef Documentation

typedef union ufmt_args ufmt_args
 

Definition at line 56 of file ufmt_cmn.h.


Enumeration Type Documentation

anonymous enum
 

Enum representing the possible argument types for uprintf/uscanf.

Enumeration values:
ufmt_count  
ufmt_int  
ufmt_char  
ufmt_wchar  
ufmt_string  
ufmt_wstring  
ufmt_pointer  
ufmt_float  
ufmt_double  
ufmt_date  
ufmt_uchar  
ufmt_ustring  
ufmt_last  

Definition at line 28 of file ufmt_cmn.h.


Function Documentation

UChar * ufmt_defaultCPToUnicode ( const char * s,
int32_t len )
 

Convert a string from the default codepage to Unicode.

Parameters:
s   The string to convert, in the default codepage.
len   The number of characters in s.
Returns:
A pointer to a newly allocated converted version of s, or 0 on error.

int ufmt_digitvalue ( UChar c )
 

Convert a UChar in a some radix to an integer value.

Parameters:
c   The UChar to convert.
Returns:
The integer value of c.

UBool ufmt_isdigit ( UChar c,
int32_t radix )
 

Determine if a UChar is a digit for a specified radix.

Parameters:
c   The UChar to check.
radix   The desired radix.
Returns:
TRUE if c is a digit in radix, FALSE otherwise.

UBool ufmt_isws ( UChar c )
 

Determine if a UChar is a whitespace character.

Parameters:
c   The UChar to test.
Returns:
TRUE if the UChar is a space (U+0020), tab (U+0009), carriage-return (U+000D), newline (U+000A), vertical-tab (U+000B), form-feed (U+000C), or any other Unicode-defined space, line, or paragraph separator.

void ufmt_ltou ( UChar * buffer,
int32_t * len,
long value,
int32_t radix,
UBool uselower,
int32_t minDigits )
 

Convert a long to a UChar* in a specified radix.

Parameters:
buffer   The target buffer
len   On input, the size of buffer. On output, the number of UChars written to buffer.
value   The value to be converted
radix   The desired radix
uselower   TRUE means lower case will be used, FALSE means upper case
minDigits   The minimum number of digits for for the formatted number, which will be padded with zeroes. -1 means do not pad.

char * ufmt_unicodeToDefaultCP ( const UChar * s,
int32_t len )
 

Convert a string from the Unicode to the default codepage.

Parameters:
s   The string to convert.
len   The number of characters in s.
Returns:
A pointer to a newly allocated converted version of s, or 0 on error.

long ufmt_utol ( const UChar * buffer,
int32_t * len,
int32_t radix )
 

Convert a UChar* in a specified radix to a long.

Parameters:
buffer   The target buffer
len   On input, the size of buffer. On output, the number of UChars read from buffer.
radix   The desired radix
Returns:
The numeric value.


Generated at Tue Dec 5 17:55:48 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000