diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-06-26 14:53:55 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-07-04 21:09:16 -0700 |
commit | a33c742c87c5e267f00e561c27f96ddfb522f6bc (patch) | |
tree | 413437ee5043d9094bcc852fc3a40c1f883f489c /src/til_str.h | |
parent | 8fc32619d8e63518ee8e205da9f96e274e178b2d (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.h | 1 |
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 |