From b18ffcb81a3839dbf09603d70ebb8b80f65892d3 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Thu, 12 Mar 2015 13:03:50 +0100 Subject: 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 --- common/stringhelp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/stringhelp.h') 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*/ -- cgit v1.2.3