ICU 69.1  69.1
Typedefs | Enumerations | Functions
ugender.h File Reference

C API: The purpose of this API is to compute the gender of a list as a whole given the gender of each element. More...

#include "unicode/utypes.h"
#include "unicode/localpointer.h"

Go to the source code of this file.

Typedefs

typedef enum UGender UGender
 
typedef struct UGenderInfo UGenderInfo
 Opaque UGenderInfo object for use in C programs. More...
 

Enumerations

enum  UGender { UGENDER_MALE , UGENDER_FEMALE , UGENDER_OTHER }
 Genders. More...
 

Functions

U_CAPI const UGenderInfougender_getInstance (const char *locale, UErrorCode *status)
 Opens a new UGenderInfo object given locale. More...
 
U_CAPI UGender ugender_getListGender (const UGenderInfo *genderInfo, const UGender *genders, int32_t size, UErrorCode *status)
 Given a list, returns the gender of the list as a whole. More...
 

Detailed Description

C API: The purpose of this API is to compute the gender of a list as a whole given the gender of each element.

Definition in file ugender.h.

Typedef Documentation

◆ UGender

typedef enum UGender UGender
Stable:
ICU 50

Definition at line 1 of file ugender.h.

◆ UGenderInfo

typedef struct UGenderInfo UGenderInfo

Opaque UGenderInfo object for use in C programs.

Stable:
ICU 50

Definition at line 1 of file ugender.h.

Enumeration Type Documentation

◆ UGender

enum UGender

Genders.

Stable:
ICU 50
Enumerator
UGENDER_MALE 

Male gender.

Stable:
ICU 50
UGENDER_FEMALE 

Female gender.

Stable:
ICU 50
UGENDER_OTHER 

Neutral gender.

Stable:
ICU 50

Definition at line 32 of file ugender.h.

Function Documentation

◆ ugender_getInstance()

U_CAPI const UGenderInfo* ugender_getInstance ( const char *  locale,
UErrorCode status 
)

Opens a new UGenderInfo object given locale.

Parameters
localeThe locale for which the rules are desired.
statusUErrorCode pointer
Returns
A UGenderInfo for the specified locale, or NULL if an error occurred.
Stable:
ICU 50

◆ ugender_getListGender()

U_CAPI UGender ugender_getListGender ( const UGenderInfo genderInfo,
const UGender genders,
int32_t  size,
UErrorCode status 
)

Given a list, returns the gender of the list as a whole.

Parameters
genderInfopointer that ugender_getInstance returns.
gendersthe gender of each element in the list.
sizethe size of the list.
statusA pointer to a UErrorCode to receive any errors.
Returns
The gender of the list.
Stable:
ICU 50