Jump to content
Sign in to follow this  
hot202

StringSplit help

Recommended Posts

hot202

hi if i had something like this

D:\something\JustShow this.exe

how would i use StringSplit to just show what is after the last \ but it wont always be that long or it could be longer like.

D:\something\something\something\JustShow this.exe

i tryed to work it out but i couldnt get it to show the text after the last\ i could only do it if it was always the same amount of \

Edited by hot202

Share this post


Link to post
Share on other sites
99ojo

Hi,

is this the goal:

MsgBox (0,"", _mysplit ("D:\something\something\something\JustShow this.exe"))
MsgBox (0,"", _mysplit ("D:\something\JustShow this.exe"))

Func _mysplit ($string)
    $temp = StringSplit ($string, "\")
    Return $temp [Ubound ($temp) - 1]
EndFunc

;-))

Stefan

@Edit: To slow......

Edited by 99ojo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.