Extract file extension: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 1,221:
document.txt_backup ->
/etc/pam.d/login ->
</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>
Line 1,255 ⟶ 1,281:
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>
|