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

Method endsWith

src/CppUTest/SimpleString.cpp:343–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343bool SimpleString::endsWith(const SimpleString& other) const
344{
345 size_t length = size();
346 size_t other_length = other.size();
347
348 if (other_length == 0) return true;
349 if (length == 0) return false;
350 if (length < other_length) return false;
351
352 return StrCmp(getBuffer() + length - other_length, other.getBuffer()) == 0;
353}
354
355size_t SimpleString::count(const SimpleString& substr) const
356{

Callers 3

listTestGroupNamesMethod · 0.80
TESTFunction · 0.80

Calls 2

getBufferMethod · 0.80
sizeMethod · 0.45

Tested by 3

listTestGroupNamesMethod · 0.64
TESTFunction · 0.64