Index of Section 3 Manual Pages
| Interix / SUA | stripdomainprefix.3 | Interix / SUA |
stripdomainprefix(3) stripdomainprefix(3)
stripdomainprefix()
NAME
stripdomainprefix() - remove leading domain names from strings
SYNOPSIS
#include
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.
USAGE NOTES
The stripdomainprefix function is thread safe.
The stripdomainprefix function is not async-signal safe.