File extension is in extensions list: Difference between revisions
Content deleted Content added
Changed the way to build the list of extensions using “mapIt”; changed the way to test the extension using “anyIt”. |
|||
Line 1,310: | Line 1,310: | ||
for fileName in fileNameList: |
for fileName in fileNameList: |
||
echo fileName, " |
echo fileName, " → ", ExtList.anyIt(fileName.toLowerAscii().endsWith(it))</lang> |
||
{{out}} |
{{out}} |
||
<pre> |
<pre>MyData.a## → true |
||
MyData. |
MyData.tar.Gz → true |
||
MyData. |
MyData.gzip → false |
||
MyData. |
MyData.7z.backup → false |
||
MyData. |
MyData... → false |
||
MyData |
MyData → false |
||
⚫ | |||
MyData : false |
|||
MyData_v1.0 |
MyData_v1.0.bz2 → false</pre> |
||
⚫ | |||
</pre> |
|||
=={{header|Objeck}}== |
=={{header|Objeck}}== |