Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.util.StringUtils Class Reference

Utility class for string manipulation. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.util.StringUtils:

Static Public Member Functions

static String [] splitFields (@NotNull final String line) throws UnterminatedTokenException
 Splits a line into tokens. More...
 
static String trimLeading (@NotNull final CharSequence str)
 Removes leading whitespace from a string. More...
 

Private Member Functions

 StringUtils ()
 Private constructor to prevent instantiation. More...
 

Static Private Attributes

static final Pattern PATTERN_LEADING_WHITESPACE = Pattern.compile("^[ \t]+")
 A pattern matching leading whitespace. More...
 

Detailed Description

Utility class for string manipulation.

Author
Andreas Kirschbaum

Definition at line 33 of file StringUtils.java.

Constructor & Destructor Documentation

◆ StringUtils()

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

Private constructor to prevent instantiation.

Definition at line 44 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 64 of file StringUtils.java.

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

+ 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 53 of file StringUtils.java.

Referenced by com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.createCommand(), 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 39 of file StringUtils.java.


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