aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-06-11 10:09:48 +0000
committerWerner Koch <[email protected]>2016-06-11 10:09:48 +0000
commit5ba99d9302cd86aee99958b71075d5288bb430aa (patch)
tree6f89e234b72937ffddcde93772f71b30036c2012 /common/stringhelp.h
parentg10: Export cleartext keys as cleartext (diff)
downloadgnupg-5ba99d9302cd86aee99958b71075d5288bb430aa.tar.gz
gnupg-5ba99d9302cd86aee99958b71075d5288bb430aa.zip
common: New function split_fields.
* common/stringhelp.c (split_fields): New. * common/t-stringhelp.c: Include assert.h. (test_split_fields): New. (main): Call 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 d9225a3bb..b6f4167f7 100644
--- a/common/stringhelp.h
+++ b/common/stringhelp.h
@@ -148,6 +148,10 @@ char **strsplit (char *string, char delim, char replacement, int *count);
/* Tokenize STRING using the set of delimiters in DELIM. */
char **strtokenize (const char *string, const char *delim);
+/* Split STRING into space delimited fields and store them in the
+ * provided ARRAY. */
+int split_fields (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);