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

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 <neal@g10code.de>
This commit is contained in:
Neal H. Walfield 2015-03-12 13:03:50 +01:00
parent bebab54027
commit b18ffcb81a
3 changed files with 98 additions and 1 deletions

View file

@ -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*/