edu.isi.powerloom.gui.common
Class StringUtils

java.lang.Object
  |
  +--edu.isi.powerloom.gui.common.StringUtils

public class StringUtils
extends java.lang.Object

Utility class for doing String manipulation. This class provides utilities for finding matching parens, compacting whitespace, etc.

Since:
Wed Oct 16 11:47:43 2002
Author:
Eric Melz

Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String compactWhitespace(java.lang.String inString)
          Strip out all redundant whitespace, and convert newlines to spaces.
static int findChildLeftParen(java.lang.String text, int currentPos)
          Find the position of the left paren of the first set of enclosed parenthesis.
static int findMatchingLeftParen(java.lang.String text, int rightParenPos)
           
static int findMatchingRightParen(java.lang.String text, int leftParenPos)
           
static int findParentLeftParen(java.lang.String text, int currentPos)
          Find the position of the left paren of the enclosing set of parenthesis.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

compactWhitespace

public static java.lang.String compactWhitespace(java.lang.String inString)
Strip out all redundant whitespace, and convert newlines to spaces.


findParentLeftParen

public static int findParentLeftParen(java.lang.String text,
                                      int currentPos)
Find the position of the left paren of the enclosing set of parenthesis.

Returns:
index of left paren if found, -1 if not found

findChildLeftParen

public static int findChildLeftParen(java.lang.String text,
                                     int currentPos)
Find the position of the left paren of the first set of enclosed parenthesis.

Returns:
1 + index of left paren if found, -1 if not found

findMatchingLeftParen

public static int findMatchingLeftParen(java.lang.String text,
                                        int rightParenPos)

findMatchingRightParen

public static int findMatchingRightParen(java.lang.String text,
                                         int leftParenPos)

main

public static void main(java.lang.String[] args)


Copyright © 2002 University of Southern California Information Sciences Institute. All Rights Reserved.