mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Merge branch 'master' into M17_AX25_FM
This commit is contained in:
14
Utils.cpp
14
Utils.cpp
@@ -156,3 +156,17 @@ unsigned int CUtils::countBits(unsigned int v)
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
void CUtils::removeChar(unsigned char * haystack, char needdle)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
unsigned int j = 0;
|
||||
|
||||
while (haystack[i] != '\0') {
|
||||
if (haystack[i] != needdle)
|
||||
haystack[j++] = haystack[i];
|
||||
i++;
|
||||
}
|
||||
|
||||
haystack[j] = '\0';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user