CharUtils

org.parboiled2.CharUtils
object CharUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CharUtils.type

Members list

Value members

Concrete methods

def appendLowerHexString(sb: StringBuilder, long: Long): StringBuilder

Append the lower-case hex representation of the given long to the given StringBuilder.

Append the lower-case hex representation of the given long to the given StringBuilder.

Attributes

def appendUpperHexString(sb: StringBuilder, long: Long): StringBuilder

Append the lower-case hex representation of the given long to the given StringBuilder.

Append the lower-case hex representation of the given long to the given StringBuilder.

Attributes

def escape(c: Char): String
def escape(s: String): String
def getSignedDecimalChars(long: Long, endIndex: Int, buf: Array[Char]): Unit

Converts the given Long value into its signed decimal character representation. The characters are placed into the given buffer before the given endIndex (exclusively). CAUTION: This algorithm cannot deal with Long.MinValue, you'll need to special case this value!

Converts the given Long value into its signed decimal character representation. The characters are placed into the given buffer before the given endIndex (exclusively). CAUTION: This algorithm cannot deal with Long.MinValue, you'll need to special case this value!

Attributes

def hexValue(c: Char): Int

Returns the int value of a given hex digit char. Note: this implementation is very fast (since it's branchless) and therefore does not perform ANY range checks!

Returns the int value of a given hex digit char. Note: this implementation is very fast (since it's branchless) and therefore does not perform ANY range checks!

Attributes

def lowerHexDigit(long: Long): Char

Returns the lower-case hex digit corresponding to the last 4 bits of the given Long. (fast branchless implementation)

Returns the lower-case hex digit corresponding to the last 4 bits of the given Long. (fast branchless implementation)

Attributes

def lowerHexDigit(int: Int): Char

Returns the lower-case hex digit corresponding to the last 4 bits of the given Int. (fast branchless implementation)

Returns the lower-case hex digit corresponding to the last 4 bits of the given Int. (fast branchless implementation)

Attributes

def lowerHexString(long: Long): String

Efficiently converts the given long into a lower-case hex string.

Efficiently converts the given long into a lower-case hex string.

Attributes

def numberOfDecimalDigits(long: Long): Int

Computes the number of characters required for the signed decimal representation of the given integer.

Computes the number of characters required for the signed decimal representation of the given integer.

Attributes

def numberOfHexDigits(l: Long): Int

Computes the number of hex digits required to represent the given integer. Leading zeros are not counted.

Computes the number of hex digits required to represent the given integer. Leading zeros are not counted.

Attributes

def signedDecimalChars(long: Long): Array[Char]

Returns a char array representing the given long in signed decimal representation.

Returns a char array representing the given long in signed decimal representation.

Attributes

def signedDecimalString(long: Long): String

Returns a String representing the given long in signed decimal representation.

Returns a String representing the given long in signed decimal representation.

Attributes

def toLowerCase(c: Char): Char

Efficiently lower-cases the given character. Note: only works for 7-bit ASCII letters.

Efficiently lower-cases the given character. Note: only works for 7-bit ASCII letters.

Attributes

def toUpperCase(c: Char): Char

Efficiently upper-cases the given character. Note: only works for 7-bit ASCII letters.

Efficiently upper-cases the given character. Note: only works for 7-bit ASCII letters.

Attributes

def upperHexDigit(long: Long): Char

Returns the upper-case hex digit corresponding to the last 4 bits of the given Long. (fast branchless implementation)

Returns the upper-case hex digit corresponding to the last 4 bits of the given Long. (fast branchless implementation)

Attributes

def upperHexDigit(int: Int): Char

Returns the upper-case hex digit corresponding to the last 4 bits of the given Int. (fast branchless implementation)

Returns the upper-case hex digit corresponding to the last 4 bits of the given Int. (fast branchless implementation)

Attributes

def upperHexString(long: Long): String

Efficiently converts the given long into an upper-case hex string.

Efficiently converts the given long into an upper-case hex string.

Attributes

Concrete fields

val LongMinValueChars: Array[Char]