summaryrefslogtreecommitdiff
path: root/qstd/str.c
diff options
context:
space:
mode:
Diffstat (limited to 'qstd/str.c')
-rw-r--r--qstd/str.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/qstd/str.c b/qstd/str.c
index 5461880..710409b 100644
--- a/qstd/str.c
+++ b/qstd/str.c
@@ -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;
+}