File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,29 @@ void fossil_io_cstring_free(cstring str);
5757 */
5858cstring fossil_io_cstring_copy (ccstring str);
5959
60+ /* *
61+ * @brief Converts an English number string into an integer.
62+ *
63+ * Example: "twenty-three" -> 23
64+ *
65+ * @param str Input string containing the number in English.
66+ * @param out Pointer to integer where the parsed number will be stored.
67+ * @return 0 on success, non-zero on error (invalid input).
68+ */
69+ int fossil_io_cstring_number_from_words (const char *str, int *out);
70+
71+ /* *
72+ * @brief Converts an integer number into its English representation.
73+ *
74+ * Example: 23 -> "twenty-three"
75+ *
76+ * @param num The integer to convert.
77+ * @param buffer The output buffer to store the English string.
78+ * @param size The size of the output buffer.
79+ * @return 0 on success, non-zero if the buffer is too small.
80+ */
81+ int fossil_io_cstring_number_to_words (int num, char *buffer, size_t size);
82+
6083/* *
6184 * @brief Duplicates the given cstring.
6285 *
You can’t perform that action at this time.
0 commit comments