diff options
author | Neal H. Walfield <[email protected]> | 2015-03-12 12:03:50 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-03-23 18:58:25 +0000 |
commit | b18ffcb81a3839dbf09603d70ebb8b80f65892d3 (patch) | |
tree | 1392ba5325cd04475a20cf9889c7f93d8f37edb2 /common/stringhelp.h | |
parent | gpg: Consider a mailbox only userid in mail search mode. (diff) | |
download | gnupg-b18ffcb81a3839dbf09603d70ebb8b80f65892d3.tar.gz gnupg-b18ffcb81a3839dbf09603d70ebb8b80f65892d3.zip |
common: Add new helper function, strsplit.
* common/stringhelp.h (strsplit): New declaration.
* common/stringhelp.c (strsplit): New function.
* common/t-stringhelp.c (test_strsplit): New function.
(main): Call it here.
--
Signed-off-by: Neal H. Walfield <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | common/stringhelp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/stringhelp.h b/common/stringhelp.h index ffef2d52f..864a6893b 100644 --- a/common/stringhelp.h +++ b/common/stringhelp.h @@ -1,6 +1,7 @@ /* stringhelp.h * Copyright (C) 1998, 1999, 2000, 2001, 2003, * 2006, 2007, 2009 Free Software Foundation, Inc. + * 2015 g10 Code GmbH * * This file is part of JNLIB, which is a subsystem of GnuPG. * @@ -142,9 +143,9 @@ char *strconcat (const char *s1, ...) GNUPG_GCC_A_SENTINEL(0); /* Ditto, but die on error. */ char *xstrconcat (const char *s1, ...) GNUPG_GCC_A_SENTINEL(0); +char **strsplit (char *string, char delim, char replacement, int *count); /*-- mapstrings.c --*/ const char *map_static_macro_string (const char *string); - #endif /*LIBJNLIB_STRINGHELP_H*/ |