# Class ParserUtils (5.0.3)

    public class ParserUtils

A helper class that holds various, state-less utility
functions used by the query parser.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> ParserUtils

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### isDate(CharSequence text)

    public static boolean isDate(CharSequence text)

Returns if the given string looks like a date to us. We only accept ISO 8601 dates, which have
the dddd-dd-dd format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `text` | `https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html` text checked if it looks like a date |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | whether this could be an ISO 8601 date |

### isNumber(CharSequence text)

    public static boolean isNumber(CharSequence text)

Returns whether or not the given text looks like a number.
The number is defined as
'-'? digit\* ('.' digit\* ('E' ('+' \| '-')? digit+)?)?

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `text` | `https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html` the text tested if it looks like a number |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | whether or not the text represents a floating point number |

### trimLast(String text)

    public static String trimLast(String text)

Removes the last character from the given text

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `text` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### unescapePhraseText(CharSequence phrase)

    public static String unescapePhraseText(CharSequence phrase)

Extracts phrase text by removing quotes from either end, and interpreting escape sequences.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `phrase` | `https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |