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

 

strprefixed

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

Synopsis

If string starts with specified prefix, returns TRUE. If string does not start with specified prefix, returns FALSE.

Source Code - (sflstr.c)

{
    ASSERT (string);
    ASSERT (prefix);

    if (*string == *prefix              /*  Check that first letters match   */
    &&  strlen (string) >= strlen (prefix)
    &&  memcmp (string, prefix, strlen (prefix)) == 0)
        return (TRUE);
    else
        return (FALSE);
}

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