Jump to content

if string contains space


masvil
 Share

Recommended Posts

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 by killaz219
Link to comment
Share on other sites

  • Developers

Have a look at this and see if that makes sense: :idiot:

$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.
  :)

Link to comment
Share on other sites

  • Developers

You're right, maybe I was dronken  :idiot:

Thanx

<{POST_SNAPBACK}>

Dronken ? yeap guess so .. :D

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.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...