From 849467870ee1c10e0a7b1e89cfc9e8214e4963fe Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 17 Jul 2017 13:00:44 +0200 Subject: common: New function split_fields_colon. * common/stringhelp.c (split_fields_colon): New. * common/t-stringhelp.c (test_split_fields_colon): New test. (main): Call that test. Signed-off-by: Werner Koch --- common/stringhelp.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/stringhelp.h') diff --git a/common/stringhelp.h b/common/stringhelp.h index a643f359f..5b07af95e 100644 --- a/common/stringhelp.h +++ b/common/stringhelp.h @@ -151,6 +151,10 @@ char **strtokenize (const char *string, const char *delim); * provided ARRAY. */ int split_fields (char *string, char **array, int arraysize); +/* Split STRING into colon delimited fields and store them in the + * provided ARRAY. */ +int split_fields_colon (char *string, char **array, int arraysize); + /* Return True if MYVERSION is greater or equal than REQ_VERSION. */ int compare_version_strings (const char *my_version, const char *req_version); -- cgit v1.2.3