Skip to Content
0
Former Member
Apr 16, 2009 at 02:20 AM

extract portion of the string ?

23 Views

Hi Guys,

My string field in the response should not have more than 40 char. The string i am intrested from the source is from 8th charachter to 40 char. I am using the following code and getting only 32 chars. I need 40 char.

int length = a.length();

if (length>40) {

String b=a.substring(8,40);

return b;    
   } 

else 

return a;

any help would be appreciated

Thanks,

Raj