MCPcopy Create free account
hub / github.com/Singular/Singular / ends_with

Method ends_with

ppcc/adlib/str.cc:140–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140bool Str::ends_with(const char *s, Int n) {
141 if (n > _len)
142 return false;
143 return memcmp(_data + _len - n, s, n) == 0;
144}
145
146bool Str::ends_with(const char *s) {
147 return ends_with(s, strlen(s));

Callers 5

ends_withFunction · 0.80
WalkDirFunction · 0.80
ListFileTreeFunction · 0.80
ParseArgsFunction · 0.80
c_sourceMethod · 0.80

Calls 3

ends_withFunction · 0.85
c_strMethod · 0.80
lenMethod · 0.45

Tested by 1

ends_withFunction · 0.64