MCPcopy Create free account
hub / github.com/IoLanguage/io / UArray_pathExtension

Function UArray_pathExtension

libs/basekit/source/UArray_path.c:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85UArray *UArray_pathExtension(UArray *self) {
86 long pos = UArray_findPathExtension(self);
87
88 if (pos == -1 || pos == self->size - 1) {
89 return UArray_newWithCString_copy_("", 1);
90 }
91
92 return UArray_range(self, pos + 1, self->size - pos - 1);
93}
94
95UArray *UArray_fileName(UArray *self) {
96 // it looks like there is a memory stomping bug in this method...

Callers 1

IoSeq_immutable.cFile · 0.85

Calls 3

UArray_findPathExtensionFunction · 0.85
UArray_rangeFunction · 0.85

Tested by

no test coverage detected