From c70673f4e73c7a071cff12735789eb6d45380d74 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 9 Sep 2021 20:56:12 +0200 Subject: Add libnumtext_card2ord MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libnumtext.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libnumtext.h') 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 -- cgit v1.2.3-70-g09d2