]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/strsep.c
1 /* Copyright (C) 2004 Free Software Foundation, Inc.
2 * Written by Yoann Vandoorselaere <yoann@prelude-ids.org>
4 * The file is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This file is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this file; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 #include "compat/strsep.h"
26 strsep(char **stringp
, const char *delim
)
28 char *start
= *stringp
;
35 ptr
= start
+ strlen (start
);
37 ptr
= strpbrk (start
, delim
);