It's not a secret anymore!*
The moose likes Beginning Java and the fly likes How to break  a long String into small parts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to break  a long String into small parts?" Watch "How to break  a long String into small parts?" New topic
Author

How to break a long String into small parts?

raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Hi
Is there any method in the Java 1.5 API ,with which i can break a long string into small strings by specifying the length of smaller string.
Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42294
    
  64
That's what the String.substring methods do.


Ping & DNS - my free Android networking tools app
raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Thanks Ulf.
Piet Verdriet
Ranch Hand

Joined: Feb 25, 2006
Posts: 266
Or you could use String.split(...), which immediately returns an array of Strings.
[ October 09, 2008: Message edited by: Piet Verdriet ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to break a long String into small parts?