| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

strdefix

#include "sflstr.h"
char *
strdefix (
    const char *string,
    const char *prefix)

Synopsis

If string starts with specified prefix, returns pointer to character after prefix. Null character is not considered part of the prefix. If string does not start with specified prefix, returns NULL.

Source Code - (sflstr.c)

{
    ASSERT (string);
    ASSERT (prefix);

    if (strlen (string) >= strlen (prefix)
    &&  memcmp (string, prefix, strlen (prefix)) == 0)
        return ((char *) string + strlen (prefix));
    else
        return (NULL);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation