aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-07-17 11:00:44 +0000
committerWerner Koch <[email protected]>2017-07-17 13:53:16 +0000
commit849467870ee1c10e0a7b1e89cfc9e8214e4963fe (patch)
treec0c02cb105b0b928236636e453767425d85dd8f8 /common/stringhelp.h
parenttests: Improve 'shell.scm' script. (diff)
downloadgnupg-849467870ee1c10e0a7b1e89cfc9e8214e4963fe.tar.gz
gnupg-849467870ee1c10e0a7b1e89cfc9e8214e4963fe.zip
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 <[email protected]>
Diffstat (limited to 'common/stringhelp.h')
-rw-r--r--common/stringhelp.h4
1 files changed, 4 insertions, 0 deletions
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);