Extract file extension: Difference between revisions
Content deleted Content added
→{{header|Perl}}: shorter, cleaner code |
Improved C# implementation |
||
Line 334:
=={{header|C sharp|C#}}==
<lang [[C sharp|C#]]>public static string FindExtension(string filename) {
int indexOfDot = filename.Length;
char
if (c == '.')
if (c >= 'A'
if (c >= 'a' && c <=
}
return filename.Substring(indexOfDot);
}</lang>▼
▲ }
▲ for (int j = temp.Length - 1; j >= 0; j--)
▲</lang>
=={{header|Emacs Lisp}}==
|