Package com.twineworks.tweakflow.util
Class LangUtil
java.lang.Object
com.twineworks.tweakflow.util.LangUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbytesToHex(byte[] bytes) static Stringstatic Stringstatic Stringstatic Stringstatic StringgetKeyLiteral(String id) static Stringstatic Stringstatic booleanisPossiblyDateTime(String str) Returns whether the given string has a chance to parse correctly using toDateTime()static DateTimeValuetoDateTime(String str, SourceInfo sourceInfo) Converts a string conforming to language rules to a datetime value.
-
Constructor Details
-
LangUtil
public LangUtil()
-
-
Method Details
-
escapeString
-
getStringLiteral
-
escapeSingleQuotedString
-
getSingleQuotedStringLiteral
-
bytesToHex
-
escapeIdentifier
-
escapeTimeZoneIdentifier
-
getKeyLiteral
-
isPossiblyDateTime
Returns whether the given string has a chance to parse correctly using toDateTime()- Parameters:
str-- Returns:
-
toDateTime
Converts a string conforming to language rules to a datetime value. Suitable to parse a string as provided by the lexer.- Parameters:
str- the string to convert to a datetimesourceInfo- location of source in case we're parsing sourcecode- Returns:
-