Talk:File extension is in extensions list: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Dupe?: added some comments and examples.)
(→‎Dupe?: I misread but it still seems similar. Maybe simplify this one?)
Line 13: Line 13:
::::* funny...
::::* funny...
-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:28, 11 August 2014 (UTC)
-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:28, 11 August 2014 (UTC)
::I didn't read it quite right the first time and didn't see that the entire filename is an input rather than just its extension. I think it would be better to have a task for separating the file extension from the full filename without the list search task that this one is similar to. The task here is just combining two really simple tasks into an uncommon compound task. --[[User:Mwn3d|Mwn3d]] ([[User talk:Mwn3d|talk]]) 20:50, 11 August 2014 (UTC)

Revision as of 20:50, 11 August 2014

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)

I didn't read it quite right the first time and didn't see that the entire filename is an input rather than just its extension. I think it would be better to have a task for separating the file extension from the full filename without the list search task that this one is similar to. The task here is just combining two really simple tasks into an uncommon compound task. --Mwn3d (talk) 20:50, 11 August 2014 (UTC)