String indices before and after transformation?

The best approach is going to depend on how you're stripping the HTML tags. If you're simply removing everything enclosed in brackets, then you can just loop through the old string and keep a count of everything outside brackets preceding the old index. Something along these lines would probably work.

As you strip out each tag, you obviously know the length of the tag you just removed. For each such tag, look for all word index values that are later than the index of the tag you just removed. For any found, subtract the length of the tag from the indexes.

This keeps the indexes in sync as you remove tags, making the task much simpler than trying to calculate adjustments at the end.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions