I am trying to split the below string into three parts
String _books = "|||###Chapter 01###ONE###INDEX 1|||###Chapter
02###TWO###INDEX 2|||###Chapter 03###THREE###INDEX 3|||";
so the above code should print like this:
chapter: chapter 01
title: ONE
page: INDEX 1
chapter: chapter 02
title: TWO
page: INDEX 2
.....
.....
for(String book: _books.split("|||"))
{
String[] parts = book.split("###");
System.out.println("chapter: " + parts[0]);
System.out.println("title: " + parts[1]);
System.out.println("page: " + parts[2]);
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en