All pastes #382280 Raw Edit

Untitled

public text v1 · immutable
·published 2007-03-05 14:27 UTC
rendered paste body
strpos(const string[],character = ' ')
{
    new len = strlen(string);
    for(new i = 0; i < len; i++)
    {
        if (string[i] == character) return i+1;
    }
    return false;
}

/*
new pos = strpos("hello",'e');
printf("%d",pos);
*/