Extract file extension: Difference between revisions

no edit summary
m (syntax highlighting fixup automation)
No edit summary
Line 1,255:
mount.ecryptfs ecryptfs
....
</pre>
 
 
=={{header|FutureBasic}}==
The underscores is a valid extension character in macOS and extensions are returned without leading dots.
<syntaxhighlight lang="futurebasic">include "NSLog.incl"
 
void local fn DoIt
CFArrayRef paths = @[@"http://example.com/download.tar.gz",@"CharacterModel.3DS",@".desktop",@"document",@"document.txt_backup",@"/etc/pam.d/login"]
CFStringRef path
for path in paths
NSLog(@"%@",fn StringPathExtension( path ))
next
end fn
 
fn DoIt
 
HandleEvents</syntaxhighlight>
 
{{Out}}
<pre>
gz
3DS
desktop
null
txt_backup
null
</pre>
 
416

edits