string.c
changeset 2775 d3ed38a97250
parent 2234 d44294cfea36
child 4200 a45420ba0c23
equal deleted inserted replaced
2774:4b7d8beec975 2775:d3ed38a97250
    55 	va_end(va);
    55 	va_end(va);
    56 	p = malloc(len + 1);
    56 	p = malloc(len + 1);
    57 	if (p != NULL) memcpy(p, buf, len + 1);
    57 	if (p != NULL) memcpy(p, buf, len + 1);
    58 	return p;
    58 	return p;
    59 }
    59 }
       
    60 
       
    61 void str_validate(char *str)
       
    62 {
       
    63 	for (; *str != '\0'; str++)
       
    64 		if (!IsValidAsciiChar(*str)) *str = '?';
       
    65 }