Android - Split the paragraphs in a string -


i have long string holds tags p /p paragraphs. html string placed in web view.

i need split paragraphs 2 , assign each 1 string. example:

string a:  <p> have orange <\p> <p> have apple <\p> <p> have banana <\p> <p> have fruit <\p> <p> love go bike riding<\p> <p> hello how <\p>  need split paragraphs 2 , assign 2 different strings:  string b should have: <p> have orange <\p> <p> have apple <\p> <p> have banana <\p>  string c should have:  <p> have fruit <\p> <p> love go bike riding<\p> <p> hello how <\p> 

how can achieve it?

this code. note added § character in stra, in order split string:

final string stra = "<p> have orange </p><p> have apple </p><p> have banana </p>§<p> have fruit </p><p> love go bike riding</p><p> hello how </p>"; final string arr[] = stra.split("§"); final string strb = arr[0]; // contains: "<p> have orange </p><p> have apple </p><p> have banana </p>" final string strc = arr[1]; // contains: "<p> have fruit </p><p> love go bike riding</p><p> hello how </p>" 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -