string-util: add find_line[_after] functions
As a wrapper for `find_line_startswith`, `find_line_after` search for the exact line and return the pointer for the next line, or NULL if missing. `find_line` with search for the exact line and return the pointer to the beginning of the line. Signed-off-by: Alberto Planas <aplanas@suse.com>
This commit is contained in:
@@ -279,6 +279,8 @@ char* strdupcspn(const char *a, const char *reject);
|
||||
})
|
||||
|
||||
char* find_line_startswith(const char *haystack, const char *needle);
|
||||
char* find_line(const char *haystack, const char *needle);
|
||||
char* find_line_after(const char *haystack, const char *needle);
|
||||
|
||||
bool version_is_valid(const char *s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user