Closed richzw closed 8 years ago
Great tip.
:shipit:
nice :shipit:
:shipit:
:shipit:
:shipit: . Nice work!
A couple of issues:
Your _How does it work? section is a word-for-word copy of the linked StackOverflow answer. You should probably rewrite it in your own words to avoid accusations of plagiarism. (The other reason to do so is that the original explanation actually leaves out a couple of details.)
You should also make a note that getFileExtension3()
is the only correct implementation of the three. I suggest making a table of the results of all three functions called over all your test strings, so that the differences become obvious.
@gromgit, thank you for your comments, I have updated this tip per your suggestion.
@richzw thanks for your tip! really good tip!
Get file extension
TL;DR;
Several solutions are posted here to get the more efficient way to get the file extension.
@richzw
Extra