return ret;
}
-/**
- Like strncpy but always null terminates. Make sure there is room!
- The variable n should always be one less than the available size.
-**/
-char *StrnCpy(char *dest,const char *src,size_t n)
-{
- char *d = dest;
-
- if (!dest) {
- smb_panic("ERROR: NULL dest in StrnCpy");
- }
-
- if (!src) {
- *dest = 0;
- return(dest);
- }
-
- while (n-- && (*d = *src)) {
- d++;
- src++;
- }
-
- *d = 0;
- return(dest);
-}
-
/**
Check if a string is part of a list.
**/