Q:

Android: Divide one String into 2 String values from responseBody

With this function I got a String from the server as a response:
String responseBody = EntityUtils.toString(response.getEntity());

the String value I retrieve looks more or less like this:
"http://url.com 765889"

I want to divide the URL and the numbers into 2 String values, it should be: 
String 1="http://url.com" 
String 2="765889"

How am I able to perform that? 

A:

Use the split() function:
String[] parts = responseBody.split(" ");

A:

Maybe like this
String 1 = responseBody.substring(0,responseBody.indexOf(" ")-1);
String 2 = responseBody.substring(responseBody.indexOf(" ").responseBody.length()-1);

