Udp
This commit is contained in:
committed by
Matthew McClaskey
parent
ba902f8194
commit
3b40a92548
19
common/network/webudp/WuString.cpp
Normal file
19
common/network/webudp/WuString.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "WuString.h"
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
int32_t FindTokenIndex(const char* s, size_t len, char token) {
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
if (s[i] == token) return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool MemEqual(const void* first, size_t firstLen, const void* second,
|
||||
size_t secondLen) {
|
||||
if (firstLen != secondLen) return false;
|
||||
|
||||
return memcmp(first, second, firstLen) == 0;
|
||||
}
|
||||
Reference in New Issue
Block a user