Author |
Message
Pages: 1
|
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [64] function getFileExt - posted: 2011-09-16 19:41:59 Whilst working on a small project I needed a function to get file extension so i've written a quick small function, i thought i'd share it in case someone else needs it for now, i will probably add this to the library for the next release. Code:
the usage is pretty simple, the function will take the string input find the .ext and return a pointer to the string with the offset, so bare in mind it still is pointing to the string you pass. Code:
output: Code:
this can and will be improved when i see the need to or unless someone else beats me to it :P Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [67] - posted: 2011-09-17 18:03:42 changed a little so if there is no "." eax will point to the end null char meaning a blank Code:
note you may also add the uses ecx clause. Code:
Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1248] - posted: 2012-12-06 20:49:49 The latest version of this sample function is as follows: Code:
This is already included in the include library, but posted for sample sake Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1255] - posted: 2012-12-09 22:12:13 yet another update: Code:
this one is even faster. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1331] - posted: 2013-02-17 01:31:38 1 thing i missed that was pointed out to me is a filename that starts with the . here is the correction Code:
Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Currently Active Users: There are currently 3 user(s) online. 0 member(s) and 3 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |