File extension is in extensions list: Difference between revisions

added whitespace to the task's preamble, indented the tables, promoted from a draft task to a (full) task.
m (→‎{{header|REXX}}: changed some variable names and comments.)
(added whitespace to the task's preamble, indented the tables, promoted from a draft task to a (full) task.)
Line 1:
{{draft task}} [[Category:File_System_Operations]] [[Category:String_manipulation]]
[[Category:String_manipulation]]
 
{{task heading}}
[[wp:Filename extension|Filename extensions]] are a rudimentary but commonly used way of identifying files types.
 
{{task heading}}
 
;Task:
Given an arbitrary filename and a list of extensions, tell whether the filename has one of those extensions.
 
 
Notes:
Line 22 ⟶ 25:
The following test cases all assume this list of extensions: &nbsp; <code>zip</code>, <code>rar</code>, <code>7z</code>, <code>gz</code>, <code>archive</code>, <code>A##</code>
 
:::::::: {| class="wikitable"
|-
! Filename
Line 42 ⟶ 45:
If your solution does the extra credit requirement, add <code>tar.bz2</code> to the list of extensions, and check the following additional test cases:
 
:::::::: {| class="wikitable"
|-
! Filename
Line 60 ⟶ 63:
For these reasons, this task exists in addition to the [[Extract file extension]] task.
 
{{task heading|Related tasks}}
 
{{task heading|;Related tasks}}:
* [[Extract file extension]]
* [[String matching]]
<br><br>
 
<hr>
 
=={{header|11l}}==