summaryrefslogtreecommitdiff
path: root/src/til_str.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-06-26 14:53:55 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-04 21:09:16 -0700
commita33c742c87c5e267f00e561c27f96ddfb522f6bc (patch)
tree413437ee5043d9094bcc852fc3a40c1f883f489c /src/til_str.h
parent8fc32619d8e63518ee8e205da9f96e274e178b2d (diff)
til_str: introduce til_str_chomp()
Helper for trimming off a trailing CRNL or NL if present Clearly I once knew perl if this is the name that came to mind
Diffstat (limited to 'src/til_str.h')
-rw-r--r--src/til_str.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/til_str.h b/src/til_str.h
index e653884..544185c 100644
--- a/src/til_str.h
+++ b/src/til_str.h
@@ -10,5 +10,6 @@ int til_str_appendf(til_str_t *str, const char *format, ...);
char * til_str_strdup(const til_str_t *str);
const char * til_str_buf(const til_str_t *str, size_t *res_len);
char * til_str_to_buf(til_str_t *str, size_t *res_len);
+til_str_t * til_str_chomp(til_str_t *str);
#endif
© All Rights Reserved