Extract file extension: Difference between revisions
Content added Content deleted
No edit summary |
(Added Easylang) |
||
Line 929: | Line 929: | ||
document.txt_backup |
document.txt_backup |
||
/etc/pam.d/login</pre> |
/etc/pam.d/login</pre> |
||
=={{header|EasyLang}}== |
|||
<syntaxhighlight> |
|||
func$ exext path$ . |
|||
for i = len path$ downto 1 |
|||
c$ = substr path$ i 1 |
|||
c = strcode c$ |
|||
if c >= 65 and c <= 90 or c >= 97 and c <= 122 or c >= 48 and c <= 57 |
|||
ex$ = c$ & ex$ |
|||
elif c$ = "." |
|||
return ex$ |
|||
else |
|||
break 1 |
|||
. |
|||
. |
|||
. |
|||
for s$ in [ "http://example.com/download.tar.gz" "CharacterModel.3DS" ".desktop" "document" "document.txt_backup" "/etc/pam.d/login" ] |
|||
print s$ & " -> " & exext s$ |
|||
. |
|||
</syntaxhighlight> |
|||
=={{header|Emacs Lisp}}== |
=={{header|Emacs Lisp}}== |