summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-08-04 11:52:02 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-08-04 12:04:52 -0300
commit9814032f6c264102b22fcbfe5a51e230fe6037d1 (patch)
treeaf0b371387ecd06f0dda8f41c6dc598ea034809e /misc.h
parent2178b6f62737bf78971a9075d96ae66cbb99c993 (diff)
misc: Add `remove_trailing_whitespace()`
This function removes any whitespace found at the end of the supplied string. This can be useful when you have a string with whitespace throughout it, but only want the whitespace at the end removed.
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/misc.h b/misc.h
index eb839de..338c546 100644
--- a/misc.h
+++ b/misc.h
@@ -5,6 +5,7 @@
extern char *read_file(const char *filename, long *size);
extern char *find_delm(char *str, const char *delm, int skip_delm);
+extern char *remove_trailing_whitespace(char *str);
extern char *get_str_delm_range(char *str, const char *start_delm, const char *end_delm, char **rhs);
extern char *get_line(char **str);
extern char *make_str(const char *str);