EAF 7.4 Implementation

com.lutris.util
Class QuotedString

java.lang.Object
  extended by com.lutris.util.QuotedString

public final class QuotedString
extends java.lang.Object

Static convenience class for parsing various types of quoted strings.


Constructor Summary
QuotedString()
           
 
Method Summary
static java.lang.String parseCString(char[] c)
          Parse a C style quoted string.
static java.lang.String parseCString(char[] c, int offset)
          Parse a C style quoted string.
static java.lang.String parseCString(java.lang.String s)
          Parse a C style quoted string.
static java.lang.String parseCString(java.lang.String s, int offset)
          Parse a C style quoted string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuotedString

public QuotedString()
Method Detail

parseCString

public static final java.lang.String parseCString(java.lang.String s)
Parse a C style quoted string. If the first character is a quote, then all characters up to a closing quote or end-of-string are gathered into a new String. The '\' character has the same semantics as in C. That is, it literally quotes the next character. Also, the four character sequence "\ddd" is converted to the character represented by the octal value ddd.

Parameters:
s - The string from which the quoted string is to be parsed.
Returns:
The parsed, quoted string.

parseCString

public static final java.lang.String parseCString(java.lang.String s,
                                                  int offset)
Parse a C style quoted string. If the first character is a quote, then all characters up to a closing quote or end-of-string are gathered into a new String. The '\' character has the same semantics as in C. That is, it literally quotes the next character. Also, the four character sequence "\ddd" is converted to the character represented by the octal value ddd.

Parameters:
s - The string from which the quoted string is to be parsed.
offset - The index into the string at which parsing is to begin.
Returns:
The parsed, quoted string.

parseCString

public static final java.lang.String parseCString(char[] c)
Parse a C style quoted string. If the first character is a quote, then all characters up to a closing quote or end-of-string are gathered into a new String. The '\' character has the same semantics as in C. That is, it literally quotes the next character. Also, the four character sequence "\ddd" is converted to the character represented by the octal value ddd.

Parameters:
c - The character array from which the quoted string is to be parsed.
Returns:
The parsed, quoted string.

parseCString

public static final java.lang.String parseCString(char[] c,
                                                  int offset)
Parse a C style quoted string. If the first character is a quote, then all characters up to a closing quote or end-of-string are gathered into a new String. The '\' character has the same semantics as in C. That is, it literally quotes the next character. Also, the four character sequence "\ddd" is converted to the character represented by the octal value ddd.

Parameters:
c - The character array from which the quoted string is to be parsed.
offset - The index into the string at which parsing is to begin.
Returns:
The parsed, quoted string.

EAF 7.4 Implementation