This commit is contained in:
2025-04-13 00:43:33 +02:00
parent 63b336783b
commit e7f1c877e0
13 changed files with 225 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ char* PulseStrtokR(char* str, const char* delim, char** saveptr)
return token;
}
static int isspace(int x)
static int PulseIsSpace(int x)
{
return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n') || ((x) == '\f') || ((x) == '\v');
}
@@ -131,10 +131,10 @@ static int isspace(int x)
void PulseTrimString(char* str)
{
char* start = str;
while(*start && isspace((unsigned char)*start))
while(*start && PulseIsSpace((unsigned char)*start))
start++;
char* end = start + strlen(start) - 1;
while(end > start && isspace((unsigned char)*end))
while(end > start && PulseIsSpace((unsigned char)*end))
end--;
*(end + 1) = '\0';
if(start != str)