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

Function FileExtension

ppcc/adlib/os.cc:354–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354Str *FileExtension(Str *path) {
355 Int slash = path->rfind(PathSeparator);
356 Int dot = path->rfind('.');
357 if (dot == NOWHERE || dot < slash) {
358 return S("");
359 } else {
360 return path->range_excl(dot, path->len());
361 }
362}
363
364
365static bool MakeDirRec(Str *path) {

Callers 1

TestOutputExecutableFunction · 0.85

Calls 4

rfindMethod · 0.80
SFunction · 0.70
range_exclMethod · 0.45
lenMethod · 0.45

Tested by 1

TestOutputExecutableFunction · 0.68