diff options
| author | grunfink <grunfink@comam.es> | 2025-06-12 10:59:26 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-06-12 10:59:26 +0200 |
| commit | 55213f660d0c2a14ee5b556c4422b3b9199c9355 (patch) | |
| tree | e1491fc2f25c642ff4d8fcac6a01a95e36ed72e8 /xs.h | |
| parent | 2391d2a53b42e1189151d44b5d4f7f06ec50dcf4 (diff) | |
mastoapi: another try to fix collapsing boosted posts in some apps.
Diffstat (limited to 'xs.h')
| -rw-r--r-- | xs.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -90,6 +90,7 @@ xs_str *xs_rstrip_chars_i(xs_str *str, const char *chars); xs_str *xs_strip_chars_i(xs_str *str, const char *chars); #define xs_strip_i(str) xs_strip_chars_i(str, " \r\n\t\v\f") xs_str *xs_tolower_i(xs_str *str); +xs_str *xs_toupper_i(xs_str *str); xs_list *xs_list_new(void); xs_list *xs_list_append_m(xs_list *list, const char *mem, int dsz); @@ -692,6 +693,20 @@ xs_str *xs_tolower_i(xs_str *str) } +xs_str *xs_toupper_i(xs_str *str) +/* convert to lowercase */ +{ + XS_ASSERT_TYPE(str, XSTYPE_STRING); + + int n; + + for (n = 0; str[n]; n++) + str[n] = toupper(str[n]); + + return str; +} + + /** lists **/ xs_list *xs_list_new(void) |