Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / get file extension

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Dec 2003 12:23
Returns the extension of a string. (for a file)

If you have a string like "this.is.really.dumb", it'll return "dumb".

genius
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: Utah, USA
Posted: 26th Dec 2003 00:41
cool Phaelax!

Be happy, tomorrow is another day
Tomy
20
Years of Service
User Offline
Joined: 25th Dec 2003
Location:
Posted: 26th Dec 2003 02:14
Wow, how did you do that????
I don't understand anything, but it works!!!!!!!!!!
Atreides
20
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 26th Dec 2003 22:57
it's easy to understand, where's the difficulty ?
it reads the name, but it begins from the end ; it continue to read until the letter is "." => all the others letters it has read are the format

but I think you should add something, Phaelax, because your code may crash the application



so, if there isn't any . in your file, the code won't crash

The sleeper must awaken !
Tomy
20
Years of Service
User Offline
Joined: 25th Dec 2003
Location:
Posted: 27th Dec 2003 22:19
Quote: "it's easy to understand, where's the difficulty ?
it reads the name, but it begins from the end ; it continue to read until the letter is "." => all the others letters it has read are the format
"

Maybe it was a joke...
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Dec 2003 07:18 Edited at: 26th Apr 2007 23:20
no, i realized that, but was too lazy to put in the extra check.

[Edit 3 1/2 years later]
That comment makes me sound like a noob


Login to post a reply

Server time is: 2024-05-03 16:47:52
Your offset time is: 2024-05-03 16:47:52