com.realtime.crossfire.jxclient.util
Class StringUtils

java.lang.Object
  extended by com.realtime.crossfire.jxclient.util.StringUtils

public class StringUtils
extends java.lang.Object

Utility class for string manipulation.


Field Summary
private static java.util.regex.Pattern PATTERN_LEADING_WHITESPACE
          A pattern matching leading whitespace.
 
Constructor Summary
private StringUtils()
          Private constructor to prevent instantiation.
 
Method Summary
static java.lang.String[] splitFields(java.lang.String line)
          Splits a line into tokens.
static java.lang.String trimLeading(java.lang.CharSequence str)
          Removes leading whitespace from a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATTERN_LEADING_WHITESPACE

@NotNull
private static final java.util.regex.Pattern PATTERN_LEADING_WHITESPACE
A pattern matching leading whitespace.

Constructor Detail

StringUtils

private StringUtils()
Private constructor to prevent instantiation.

Method Detail

splitFields

@NotNull
public static java.lang.String[] splitFields(@NotNull
                                                     java.lang.String line)
                                      throws UnterminatedTokenException
Splits a line into tokens. Handles quoting ("...").

Parameters:
line - the line
Returns:
the tokens
Throws:
UnterminatedTokenException - if a quoted token is unterminated

trimLeading

@NotNull
public static java.lang.String trimLeading(@NotNull
                                                   java.lang.CharSequence str)
Removes leading whitespace from a string.

Parameters:
str - the string
Returns:
the string without leading whitespace