|
|
eWON wiki > eWON Support > Knowledge Base > Questions and Answers > INSTR doesn't find chr$(0)
INSTR doesn't find chr$(0)From $1Table of contentsYou cannot search the character null ( chr$(0) ) with INSTR because chr$(0) is the string END delimiter (for the INSTR function, not for the eWON). d% = Instr 1, b$, Chr$(00) is like asking the INSTR to If you need to search the character null, you must search it manually inside the string. b$ = "hello"+chr$(0)+"bonjour" When you print it, it displays only the hello SearchNull:
position=0
For i%= 1 To LEN(B$)
If B$(i%)=Chr$(0) Then
position=i%
Endif
Next i%
Print "pos ";position
End |