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

Method rfind

ppcc/adlib/str.cc:251–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251Int Str::rfind(char ch) {
252 for (Int i = _len - 1; i >= 0; i--) {
253 if (_data[i] == ch)
254 return i;
255 }
256 return NOWHERE;
257}
258
259Int Str::rfind(const char *s, Int n) {
260 require(n >= 0, "empty string");

Callers 4

MainFunction · 0.80
DirNameFunction · 0.80
BaseNameFunction · 0.80
FileExtensionFunction · 0.80

Calls 1

requireFunction · 0.85

Tested by 1

MainFunction · 0.64