MCPcopy Create free account
hub / github.com/chrxh/alien / getFileExtension

Function getFileExtension

external/cuda/helper_string.h:97–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97inline int getFileExtension(char *filename, char **extension)
98{
99 int string_length = (int)strlen(filename);
100
101 while (filename[string_length--] != '.')
102 {
103 if (string_length == 0)
104 break;
105 }
106
107 if (string_length > 0) string_length += 2;
108
109 if (string_length == 0)
110 *extension = NULL;
111 else
112 *extension = &filename[string_length];
113
114 return string_length;
115}
116
117
118inline bool checkCmdLineFlag(const int argc, const char **argv, const char *string_ref)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected