P_argv_split 3porty 2011-04-12 libporty manual

NAME

P_argv_split

SYNPOSIS

#include <libporty/util/argv.h>

int P_argv_split (char *str , int *argc , char *argv[] , int maxargc , char *sep );

Link with -lporty_util

DESCRIPTION

Split up str into argv / argc , at most maxargc tokens. Separator is any of the characters found in sep . The call modifies str and stores pointers only from within str in argv , no string copy or memory allocation is done. argv is user-allocated and must be large enough to host at most maxargc pointers.

RETURN VALUE

Returns 0 if argc <= maxargc.

SEE ALSO

P_argv_split 3porty 2011-04-12 libporty manual