Port my old webserver from the predecessor to native

This commit is contained in:
Henrik Rydgard committed 2014-12-15 00:06:54 +01:00
1 parent 0f490c8eb5
commit 7d86cb2c04
12 files changed
+550 -5

No files matched your search

+28
View File
@@ -37,6 +37,34 @@ void OutputDebugStringUTF8(const char *p) {
#endif
void StringTrimEndNonAlphaNum(char *str) {
int n = strlen(str);
while (!isalnum(str[n]) && n >= 0) {
str[n--] = '\0';
}
}
void SkipSpace(const char **ptr) {
while (**ptr && isspace(**ptr)) {
(*ptr)++;
}
}
void StringUpper(char *str) {
while (*str) {
*str = toupper(*str);
str++;
}
}
void StringUpper(char *str, int len) {
while (len--) {
*str = toupper(*str);
str++;
}
}
unsigned int parseHex(const char *_szValue)
{
int Value = 0;