1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-06-11 12:09:48 +02:00
parent c41c46fa84
commit 5ba99d9302
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 120 additions and 0 deletions

View file

@ -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);