Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
finding a singular W in a line of text
Basically I am indexing through lines of text in a text file.
I am looking to delete lines of text with a singular W in it with a space at either side. ie " W "
I would delete this line if I could find it:-
The cat sat on the W mat.
The lines of text are read in as AnsiStrings
if (LineToCheck.AnsiPos(" W ")>0)
Blah Blah Blah
// this should find the above line but is doesn't. Any idea how I can overcome this ??