datkewlguy Posted January 9, 2006 Share Posted January 9, 2006 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. Link to comment Share on other sites More sharing options...
datkewlguy Posted January 9, 2006 Author Share Posted January 9, 2006 So say i have a string like this: Hello-WorldHow would i delete everything before and including the dash so it would just be: WorldKeeping in mind that the string lengths and character positions change, but always follow this format.nvm, i figured it out Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 9, 2006 Moderators Share Posted January 9, 2006 Just everything before? $String = 'Hello-World' $OutPut = StringTrimLeft($String, StringInStr($String, 'World') - 1) MsgBox(0, "String", $OutPut) 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. Link to comment Share on other sites More sharing options...
seandisanti Posted January 9, 2006 Share Posted January 9, 2006 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,"-")) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 9, 2006 Moderators Share Posted January 9, 2006 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!! 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now