diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-09 20:56:12 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-09 20:56:12 +0200 |
commit | c70673f4e73c7a071cff12735789eb6d45380d74 (patch) | |
tree | d222c092b7695d3b7c6bb775c9f5696eb599df0b /libnumtext.h | |
parent | misc (diff) | |
download | libnumtext-c70673f4e73c7a071cff12735789eb6d45380d74.tar.gz libnumtext-c70673f4e73c7a071cff12735789eb6d45380d74.tar.bz2 libnumtext-c70673f4e73c7a071cff12735789eb6d45380d74.tar.xz |
Add libnumtext_card2ord
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libnumtext.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libnumtext.h b/libnumtext.h index 2db0a0d..7bfaf3f 100644 --- a/libnumtext.h +++ b/libnumtext.h @@ -53,6 +53,14 @@ enum libnumtext_language { /* [1] If used, also use LIBNUMTEXT_N2T_SWEDISH_IMPLICIT_ONE, otherwise the Swedish becomes odd, and arguably incorrect */ /* [2] Requires LIBNUMTEXT_N2T_SWEDISH_ORDINAL (no effect) or LIBNUMTEXT_N2T_SWEDISH_DENOMINATOR */ +#define LIBNUMTEXT_C2O_SWEDISH_COMMON_GENDER UINT32_C(0x00000000) /* 1:a, 2:a, 3:e, … */ +#define LIBNUMTEXT_C2O_SWEDISH_NEUTER_GENDER UINT32_C(0x00000001) /* 1:a, 2:a, 3:e, … */ +#define LIBNUMTEXT_C2O_SWEDISH_MASCULINE_GENDER UINT32_C(0x00000002) /* 1:e, 2:e, 3:e, … */ +#define LIBNUMTEXT_C2O_SWEDISH_FEMININE_GENDER UINT32_C(0x00000003) /* 1:a, 2:a, 3:e, … */ + +#define LIBNUMTEXT_C2O_SWEDISH_LOWER_CASE UINT32_C(0) /* 1:a, 2:a, 3:e, … */ +#define LIBNUMTEXT_C2O_SWEDISH_UPPER_CASE UINT32_C(0x00000004) /* 1:A, 2:A, 3:E, … */ + /* input to libnumtext_num2text may not contain separators */ ssize_t libnumtext_remove_separators(char *outbuf, size_t outbuf_size, const char *num, size_t num_len, @@ -61,5 +69,8 @@ ssize_t libnumtext_remove_separators(char *outbuf, size_t outbuf_size, const cha ssize_t libnumtext_num2text(char *outbuf, size_t outbuf_size, const char *num, size_t num_len, enum libnumtext_language lang, uint32_t flags, ...); +ssize_t libnumtext_card2ord(char *outbuf, size_t outbuf_size, const char *num, size_t num_len, + enum libnumtext_language lang, uint32_t flags, ...); + #endif |