Sign in to follow this  
Followers 0
datkewlguy

string delete before character

5 posts in this topic

So say i have a string like this: Hello-World

How would i delete everything before and including the dash so it would just be: World

Keeping in mind that the string lengths and character positions change, but always follow this format.

Share this post


Link to post
Share on other sites



So say i have a string like this: Hello-World

How would i delete everything before and including the dash so it would just be: World

Keeping in mind that the string lengths and character positions change, but always follow this format.

nvm, i figured it out

Share this post


Link to post
Share on other sites

Just everything before?

$String = 'Hello-World'
$OutPut = StringTrimLeft($String, StringInStr($String, 'World') - 1)
MsgBox(0, "String", $OutPut)

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Just everything before?

$String = 'Hello-World'
$OutPut = StringTrimLeft($String, StringInStr($String, 'World') - 1)
MsgBox(0, "String", $OutPut)
i never use those StringTrim's, not for any particular reason, i always just use the stringleft and stringright

$OutPut = StringRight($string,StringLen($string)-StringInStr($string,"-"))

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

i never use those StringTrim's, not for any particular reason, i always just use the stringleft and stringright

$OutPut = StringRight($string,StringLen($string)-StringInStr($string,"-"))
I'm sure there is a reason... probably to be difficult and just see how much you could confuse someone!! :P

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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  
Followers 0