I need to display the first N (e.g. 50 or 100) characters from the entire html line. I have to display a well-formed html.If I use a simple substring that will make me have the wrong html string For example.
Example line: "<html><body><a href="http://foo.com">foo</a></body></html>"
trucated string: "<html><body><a href="http://foo.com">foo<"
This will lead me to html distortion :(
Any ideas on how to achieve this?
source share