nur für das 'a' / eine bestimmte zeichenkette
Code:
$String = "abcdefgehjlmnopqrstuv"
Switch StringInStr($String, "a")
Case 1
MsgBox("", "", "Pos1")
Case 2
MsgBox("", "", "Pos2")
Case Else
MsgBox("", "", "Nicht gefunden")
EndSwitch
und für alle buchstaben (klein)
Code:
$String = "abcdefgehjlmnopqrstuv"
For $Letter = 0x61 To 0x7A
Switch StringInStr($String, Chr($Letter))
Case 1
MsgBox("", "", "Pos1")
Case 2
MsgBox("", "", "Pos2")
Case Else
MsgBox("", "", "Nicht gefunden")
EndSwitch
Next
und für alle buchstaben (groß)
Code:
$String = "abcdefgehjlmnopqrstuv"
For $Letter = 0x41 To 0x5A
Switch StringInStr($String, Chr($Letter))
Case 1
MsgBox("", "", "Pos1")
Case 2
MsgBox("", "", "Pos2")
Case Else
MsgBox("", "", "Nicht gefunden")
EndSwitch
Next
und komplett für alle
Code:
$String = "abcdefgehjlmnopqrstuv"
For $Letter = 0x41 To 0x7A
Switch StringInStr($String, Chr($Letter))
Case 1
MsgBox("", "", "Pos1")
Case 2
MsgBox("", "", "Pos2")
Case Else
MsgBox("", "", "Nicht gefunden")
EndSwitch
If $Letter = 0x5A Then $Letter = 0x61
Next