From d7656cbc37e9bb2829bb14946d4f05b451611205 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 8 Aug 2022 17:11:07 +0200 Subject: Finalized toupper/tolower. --- include/stc/cstr.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/stc') diff --git a/include/stc/cstr.h b/include/stc/cstr.h index d7e5dcd4..bfc3b51d 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -176,6 +176,12 @@ extern cstr cstr_casefold_sv(csview sv); extern cstr cstr_tolower_sv(csview sv); extern cstr cstr_toupper_sv(csview sv); +STC_INLINE cstr cstr_tolower(const char* str) + { return cstr_tolower_sv(c_sv(str, strlen(str))); } + +STC_INLINE cstr cstr_toupper(const char* str) + { return cstr_toupper_sv(c_sv(str, strlen(str))); } + STC_INLINE void cstr_lowercase(cstr* self) { cstr_take(self, cstr_tolower_sv(cstr_sv(self))); } -- cgit v1.2.3