/* Just like strncpy but shift-case in transit and forces null termination */
char *
-lcstring(char *d, char *s, int n)
+lcstring(char *d, const char *s, int n)
{
char *original_d = d;
char c;
- if ((s == 0) || (d == 0))
- return 0; /* just to be safe */
while (n) {
c = *s++;
if (isupper(c))
}
char *
-ucstring(char *d, char *s, int n)
+ucstring(char *d, const char *s, int n)
{
char *original_d = d;
char c;
- if ((s == 0) || (d == 0))
- return 0;
while (n) {
c = *s++;
if (islower(c))
* buf: storage for the composed string. Any data in it will be lost.
* len: length of the buffer.
* ...: variable number of string arguments. The last argument must be
- * NULL.
+ * (char *)NULL.
* Returns buf or NULL if the buffer was not sufficiently large.
*/
char *
char *str;
size_t slen;
- if (buf == NULL || len <= 0)
+ if (len <= 0)
return NULL;
*buf = '\0';