MCPcopy Create free account
hub / github.com/cpputest/cpputest / AtoI

Method AtoI

src/CppUTest/SimpleString.cpp:151–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151int SimpleString::AtoI(const char* str)
152{
153 while (isSpace(*str)) str++;
154
155 char first_char = *str;
156 if (first_char == '-' || first_char == '+') str++;
157
158 int result = 0;
159 for(; isDigit(*str); str++)
160 {
161 result *= 10;
162 result += *str - '0';
163 }
164 return (first_char == '-') ? -result : result;
165}
166
167int SimpleString::StrCmp(const char* s1, const char* s2)
168{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected