Drew Posted September 3, 2008 Posted September 3, 2008 How would I go about taking a string... and searching for the first empty character ( space ) in it , and retrieve all text before it. I don't know how to search for it... because I don't know what to tell it to search for.... It's like telling it to search for nothing lol. I'm slightly confused , sorry. *Drew
enaiman Posted September 3, 2008 Posted September 3, 2008 StringSplit for " " (space) the text you're looking for is the first element of the array returned by StringSplit $text = "ThisIsallAbout Me" $test = StringSplit($text, " ") MsgBox(0, "I'm looking for", $test[1]) SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
smashly Posted September 3, 2008 Posted September 3, 2008 (edited) Hi, string play $String = "We all like AutoIt3" $tbfs = StringLeft($String, StringInStr($String, Chr(32)) -1) MsgBox(0, "Text before first space", $tbfs) Edited September 3, 2008 by smashly
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