Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

ssplit.c File Reference

A function to split a string at specified deliminters. More...


Functions

int ssplit (char *str, const char *delim, char *vec[], int vec_len, int dont_save_empty_fields, int ignore_leading)

Variables

const char ssplit_rcs [] = "$Id: ssplit.c,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"
const char ssplit_h_rcs [] = SSPLIT_H_VERSION


Detailed Description

A function to split a string at specified deliminters.

Log:
ssplit.c,v
Revision 2.0 2002/06/04 14:34:21 jongfoster Moving source files to src/

Revision 1.6 2002/03/26 22:29:55 swa we have a new homepage!

Revision 1.5 2002/03/24 13:25:43 swa name change related issues

Revision 1.4 2001/11/13 00:16:38 jongfoster Replacing references to malloc.h with the standard stdlib.h (See ANSI or K&R 2nd Ed)

Revision 1.3 2001/05/29 08:54:25 jongfoster Rewrote the innards of ssplit() to be easier to understand, faster, and to use less memory. Didn't change the interface except to give the parameters meaningful names.

Revision 1.2 2001/05/17 23:01:01 oes

Revision 1.1.1.1 2001/05/15 13:59:04 oes Initial import of version 2.9.3 source tree


Function Documentation

int ssplit char *    str,
const char *    delim,
char *    vec[],
int    vec_len,
int    dont_save_empty_fields,
int    ignore_leading
 

Split a string using delimiters in `delim'.

Results go into `vec'.

Parameters:
str  string to split. Will be split in place (i.e. do not free until you've finished with vec, previous contents will be trashed by the call).
delim  array of delimiters (if NULL, uses " \t").
vec  [] results vector (aka. array) [out]
vec_len  number of usable slots in the vector (aka. array size)
dont_save_empty_fields  zero if consecutive delimiters give a null output field(s), nonzero if they are just to be considered as single delimeter
ignore_leading  nonzero to ignore leading field separators.
Returns:
-1 => Error: vec_len is too small to hold all the data, or str == NULL. >=0 => the number of fields put in `vec'. On error, vec and str may still have been overwritten.


Variable Documentation

const char ssplit_h_rcs[] = SSPLIT_H_VERSION
 

Version information about ssplit.h.

const char ssplit_rcs[] = "$Id: ssplit.c,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"
 

Version information about ssplit.c.


Generated on Tue Jun 4 18:54:49 2002 for Privoxy 3.1.1 by doxygen1.2.15