masvil Posted December 18, 2004 Posted December 18, 2004 How can I check if a string contain a space (pure space, char 32)? I tested StringInStr, but I can't indicate space char. Also I tested StringIsAlNum, but it detects no-space chars too.
killaz219 Posted December 18, 2004 Posted December 18, 2004 (edited) What do you mean? stringinstr works $string = "this is a string" $strinstr = StringInStr($string, " ") If $strinstr > 0 Then MsgBox( 0, "", "The " & $strinstr & "th character is a space") Else MsgBox( 0, "", "no spaces found") EndIf Edited December 18, 2004 by killaz219
Developers Jos Posted December 18, 2004 Developers Posted December 18, 2004 Have a look at this and see if that makes sense: $istr = " " If StringInStr($istr," ") then MsgBox(4096,'' , '$istr contains a space somewhere.') EndIf If $istr = " " then MsgBox(4096,'' , '$istr contains ONE space.') EndIf $istr = "x x" If StringInStr($istr," ") then MsgBox(4096,'' , '$istr contains a space somewhere.') EndIf If $istr = " " then MsgBox(4096,'' , '$istr contains ONE space.') EndIf SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
masvil Posted December 18, 2004 Author Posted December 18, 2004 What do you mean? stringinstr works You're right, maybe I was dronken Thanx
Developers Jos Posted December 18, 2004 Developers Posted December 18, 2004 You're right, maybe I was dronken Thanx<{POST_SNAPBACK}>Dronken ? yeap guess so .. Dronken is Dutch for Drunk. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
masvil Posted December 18, 2004 Author Posted December 18, 2004 Dronken is Dutch for Drunk.In fact I've been a dutch lover
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