src2xml
Class StringUtils

java.lang.Object
  extended by src2xml.StringUtils

public class StringUtils
extends java.lang.Object

This class collects some String facilities


Nested Class Summary
static class StringUtils.MultipleReplacer
          A class that performs multiple replacement in a given String
 
Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String Glob2RegEx(java.lang.String line)
          Translates a glob pattern to a regex string
static java.lang.String ProcessEscapeSeqs(java.lang.String s)
          Translates the possibly escape sequences.
 
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

ProcessEscapeSeqs

public static java.lang.String ProcessEscapeSeqs(java.lang.String s)
                                          throws java.lang.Exception
Translates the possibly escape sequences. Incredible! Java does not provide one?

Parameters:
s - The input String
Returns:
The String containing the escaped characters
Throws:
java.lang.Exception - If something wrong with Regex stuff
See Also:
String, Pattern

Glob2RegEx

public static java.lang.String Glob2RegEx(java.lang.String line)
Translates a glob pattern to a regex string

Parameters:
line - The input glob pattern such as "ar*.c?p"
Returns:
The regexp String
See Also:
String, Pattern