Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to split the string

Hi Experts,

I have a string with maximum no of characters as 200,

I want to split this string into two parts with 100 100 characters,

How to do that?

I tried using split() function but i dont how to use it when splitting with no of characters.



Former Member
Former Member replied


if String s="sub string";

String s1=s.substring(0,3);

String s2 =s.substring(4,9);

use the above code to split the string s into "sub" and "string".



Edited by: Ramesh Babu V on Oct 13, 2008 12:52 PM

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question