This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes String separator by fixed length Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "String separator by fixed length" Watch "String separator by fixed length" New topic
Author

String separator by fixed length

Sham Jowsaki
Ranch Hand

Joined: May 22, 2001
Posts: 146
Hi All,
I have a string like below which will have different length on every request. I need to break this string as 50 char length and print the output until the length less than 50.
Can you please guide to achieve this task.
Thanks
Cheers
Jowsaki

024A3A6925B9CDC11D85919D95D0041F012CD41A61061C890A248B08309C4850AB08208B4834A348350718410926922C20841A61061C890A248B08309C4850AB0820D34834CB0D3CCBCD4CE4D445A41A938320F41A61061C890A248B08309C4850AB08208B4834A348350718410926922C20834D20D35421035421035421035421035320735421035421035421035421041A9903A4AB0820D3484081106D292CC20C36F213513610424DB083144DE42658A5605204E641E93742113732070000
Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
Okay this probably isn't the most elegant, but did you mean something like this?
Sham Jowsaki
Ranch Hand

Joined: May 22, 2001
Posts: 146
Thanks Eric. Yes, my requirement is the same as you stated.
Thanks for your help.
Cheers
Jowsaki
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String separator by fixed length
 
Similar Threads
drawString() on Canvas
creating Empty String with Dynamic size....
length vs length()
Disabling Choice Auto-expansion
Null teminating a string