diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-04 11:52:02 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-04 12:04:52 -0300 |
commit | 9814032f6c264102b22fcbfe5a51e230fe6037d1 (patch) | |
tree | af0b371387ecd06f0dda8f41c6dc598ea034809e /misc.h | |
parent | 2178b6f62737bf78971a9075d96ae66cbb99c993 (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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |