diff options
author | quou <quou@disroot.org> | 2025-01-04 18:41:27 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-01-04 18:41:57 +1100 |
commit | d05d908ac86243ca9413fbcad38e3d09a66c4b8a (patch) | |
tree | f847e944a8537f320425143b118dea9600211778 /qstd/str.c | |
parent | e85c68ffd7a9741fef24fa60e8be8a2deb63a8d0 (diff) |
next_line in qstd
Diffstat (limited to 'qstd/str.c')
-rw-r--r-- | qstd/str.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -64,3 +64,11 @@ char* dup_stringh(struct Heap* h, const char* s) { string_copy(d, s); return d; } + +const char* next_line(const char* line) { + const char* c; + for (c = line; *c != '\n'; c++) { + if (!*c) return 0; + } + return c + 1; +} |