Hallo,
Die Funktion Pos oder PosEx (uses StrUtils) wäre sicher auch ganz hilfreich. (Auch bei einigen deiner anderen Probleme

)
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."