stripdomainprefix()

NAME

stripdomainprefix() - remove leading domain names from strings

SYNOPSIS

#include <interix/security.h>

char * stripdomainprefix (const char *fullname, const char *domainname, int casesensitive);

DESCRIPTION

The stripdomainprefix(3) utility accepts a string containing a domain+name pair; the separator can be + or \.

If the domain in the fullname matches the value of domainname, stripdomainprefix(3) strips off the domain and returns the string name. If it doesn't match, fullname is returned.

If domainname is NULL, any domain prefixes will be stripped.

If casesensitive is 0, the match between domainname and the domain is not case-sensitive. If it is non-zero, the match is case-sensitive.

RETURN VALUES

Returns a pointer to the user name if the domain name matches, or to fullname if the name doesn't match.