/*

argvindex - Find string s on NULL terminated argv style list argvlist

*/
#include "local.h"
#include <string.h>

int argvindex(argvlist, s, strfunc)
char *argvlist[];
char *s;
int (*strfunc)();
{
    int index;
    for(index = 0; argvlist[index] != NULL; index++ ) {
        if ( (strfunc)(argvlist[index], s, strlen(argvlist[index])) == 0)
            break;
    }
    return(index);
}
code/argvindex.c.txt · Last modified: 2022-12-20 16:23 by ksadmin
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0