Talk:File extension is in extensions list

From Rosetta Code
Revision as of 20:28, 11 August 2014 by rosettacode>Gerard Schildberger (→‎Dupe?: added some comments and examples.)

Dupe?

I know it's not exactly the same but is this a close duplicate of Search a list? This one has an odd requirement that it has to be a file extension, but the other one has the extra requirement of using an indexed list. I think they're close enough and Search a list has the advantage of already being implemented a lot and not restricting the data. --Mwn3d (talk) 16:56, 11 August 2014 (UTC)

Well, the file extension has to be parsed, and there is the case of the filename not having an extension (so the requirement of having to have a file extension ... isn't).   The handling of insensitive case is a minor requirement.   It's a common enough task to warrant it's own task. -- Gerard Schildberger (talk) 20:28, 11 August 2014 (UTC)
Also, just to note, some filenames that have no file extenstion:
  • somefile
  • holy smoke
  • afile.
  • /a/path/to/glory.yup/or_not
  • funny...

-- Gerard Schildberger (talk) 20:28, 11 August 2014 (UTC)