Crossfire JXClient, Trunk
Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
com.realtime.crossfire.jxclient.util.StringUtils Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.util.StringUtils:
Collaboration graph

Static Public Member Functions

static String[] splitFields (@NotNull final String line) throws UnterminatedTokenException
 
static String trimLeading (@NotNull final CharSequence str)
 

Private Member Functions

 StringUtils ()
 

Static Private Attributes

static final Pattern PATTERN_LEADING_WHITESPACE = Pattern.compile("^[ \t]+")
 

Detailed Description

Utility class for string manipulation.

Author
Andreas Kirschbaum

Definition at line 34 of file StringUtils.java.

Constructor & Destructor Documentation

◆ StringUtils()

com.realtime.crossfire.jxclient.util.StringUtils.StringUtils ( )
private

Private constructor to prevent instantiation.

Definition at line 45 of file StringUtils.java.

Member Function Documentation

◆ splitFields()

static String [] com.realtime.crossfire.jxclient.util.StringUtils.splitFields ( @NotNull final String  line) throws UnterminatedTokenException
static

Splits a line into tokens. Handles quoting ("...").

Parameters
linethe line
Returns
the tokens
Exceptions
UnterminatedTokenExceptionif a quoted token is unterminated

Definition at line 65 of file StringUtils.java.

Referenced by com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.load(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseBegin(), and com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseFocus().

Here is the caller graph for this function:

◆ trimLeading()

static String com.realtime.crossfire.jxclient.util.StringUtils.trimLeading ( @NotNull final CharSequence  str)
static

Removes leading whitespace from a string.

Parameters
strthe string
Returns
the string without leading whitespace

Definition at line 54 of file StringUtils.java.

References com.realtime.crossfire.jxclient.util.StringUtils.PATTERN_LEADING_WHITESPACE.

Referenced by com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.createCommand(), com.realtime.crossfire.jxclient.commands.ShortcutCommand.execute(), and com.realtime.crossfire.jxclient.commands.BindCommand.execute().

Here is the caller graph for this function:

Member Data Documentation

◆ PATTERN_LEADING_WHITESPACE

final Pattern com.realtime.crossfire.jxclient.util.StringUtils.PATTERN_LEADING_WHITESPACE = Pattern.compile("^[ \t]+")
staticprivate

A pattern matching leading whitespace.

Definition at line 40 of file StringUtils.java.

Referenced by com.realtime.crossfire.jxclient.util.StringUtils.trimLeading().


The documentation for this class was generated from the following file: