|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfedora.server.utilities.StringUtility
Title: StringUtility.java
Description: A utility class for common string operations.
-----------------------------------------------------------------------------License and Copyright: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The entire file consists of original code. Copyright © 2002-2005 by The Rector and Visitors of the University of Virginia and Cornell University. All rights reserved.
-----------------------------------------------------------------------------
| Constructor Summary | |
StringUtility()
|
|
| Method Summary | |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
prettyPrint(java.lang.String in,
int lineLength,
java.lang.String delim)
Method that attempts to break a string up into lines no longer than the specified line length. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringUtility()
| Method Detail |
public static java.lang.String prettyPrint(java.lang.String in,
int lineLength,
java.lang.String delim)
Method that attempts to break a string up into lines no longer than the specified line length. The string is assumed to consist of tokens separated by a delimeter. The default delimiter is a space. If the last token to be added to a line exceeds the specified line length, it is written on the next line so actual line length is approximate given the specified line length and the length of tokens in the string.
in - The input string to be split into lines.lineLength - The maximum length of each line.delim - The character delimiter separating each token in the input
string; if null, defaults to the space character.
public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||