MCPcopy Create free account
hub / github.com/MyGUI/mygui / endWith

Function endWith

MyGUIEngine/include/MyGUI_StringUtility.h:219–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217 }
218
219 inline bool endWith(std::string_view _source, std::string_view _value)
220 {
221#if __cplusplus >= 202002L
222 return _source.ends_with(_value);
223#else
224 size_t count = _value.size();
225 if (_source.size() < count)
226 return false;
227 size_t offset = _source.size() - count;
228 for (size_t index = 0; index < count; ++index)
229 {
230 if (_source[index + offset] != _value[index])
231 return false;
232 }
233 return true;
234#endif
235 }
236
237} // namespace MyGUI
238

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected