MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / CompareSubstr

Function CompareSubstr

Source/UserInput/keycommands.cpp:123–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123bool CompareSubstr(const char* str, const char* substr, int substr_len) {
124 int i = 0;
125 while (str[i] != '\0' && substr[i] != '\0' && i < substr_len) {
126 if (str[i] != substr[i]) {
127 return false;
128 }
129 ++i;
130 }
131 return str[i] == '\0' && i == substr_len;
132}
133
134void KeyCommand::BindString(const char* bind_str) {
135 KeyEvent events[kMaxKeyEvents];

Callers 1

BindStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected