Entwickler-Ecke

Algorithmen, Optimierung und Assembler - Simple code not working


chukalv - Di 10.05.05 21:02
Titel: Simple code not working
Why isn`t this working?


Quelltext
1:
if pos('</head><body bgcolor=#ffffff>','a') > 0  then ShowMessage('Found!');                    


I can`t just understand it...


Tobias1 - Di 10.05.05 21:07

You mean that "a"?
a is in </head><body bgcolor=#ffffff>

Pos(searchstr,str)


Delete - Di 10.05.05 21:07

The first parameter of pos is the search item.

Pos('a','</head><body bgcolor=#ffffff>') returns 5


chukalv - Di 10.05.05 21:13

damn.. sorry about my stupidity...