The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Utility class wanted to parse strings

Posted by hbar on January 16, 2001 at 10:18 AM

Does java contain a utility class that performs the same functionality as sprintf in C.

I have a set of strings say :
stringOne
stringTwo
stringThree

I want to enter them into a string buffer so that -
stringOne takes characters 0 to 20 space filled
stringTwo takes characters 21 to 39 space filled
stringThree takes characters 40 to 60 space filled

Is there a utilty class that will aid, or is it a matter of concatenating the strings and spaces as appropriate ?

Thanks






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us