string_utils: add trim_both

trim_both removes whitespaces from both side of a string.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2022-07-17 15:30:42 +01:00
parent e757a6461d
commit 7e833744b7
3 changed files with 30 additions and 1 deletions

View File

@@ -11,6 +11,7 @@
char *mstrjoin(const char *src1, const char *src2);
char *mstrjoin3(const char *src1, const char *src2, const char *src3);
void mstrextend(char **psrc1, const char *src2);
const char *trim_both(const char *src, size_t *length);
/// Parse a floating point number of form (+|-)?[0-9]*(\.[0-9]*)
double strtod_simple(const char *, const char **);