Is this homework? Anyway, look the string.h documentation and you should find what you need without much trouble. You will need to write a very thin wrapper over one of the functions. Or, of course, you can just write it all yourself.
EDIT: Well, someone else gave a answer, so here's my attempt.
#include <string.h>
ssize_t str_index(const char *strA, const char *strB)
{
const char *result;
return (result = strstr(strB, strA)) ? (result - strB) : -1;
}
The only tricks are that the parameter order is reversed from strstr, you're returning an ssize_t instead of char *, and the failure code is thus -1.