Jump to content

File extension is in extensions list: Difference between revisions

Line 232:
true</pre>
=={{header|Scala}}==
[[Category:Scala Implementations]]<lang Scala>def isExt(fileName: String, extensions: List[String]): Boolean = {
<lang Scala>
def isExt(fileName: String, extensions: List[String]): Boolean = {
extensions.map { _.toLowerCase }.exists { fileName.toLowerCase endsWith _ }
}</lang Scala>
}
</lang>
 
=={{header|zkl}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.