Class DtoaBuffer
java.lang.Object
com.oracle.truffle.js.runtime.doubleconv.DtoaBuffer
A buffer for generating string representations of doubles.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximal length of numbers converted by FastDtoa -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the formatted buffer content as string, using the specified conversion mode and padding.intGet the position of the decimal point.intReturns the number of characters in the buffer.Get the raw digits of this buffer as string.voidreset()Clear the buffer contents and set its length to0.toString()
-
Field Details
-
kFastDtoaMaximalLength
public static final int kFastDtoaMaximalLengthMaximal length of numbers converted by FastDtoa- See Also:
-
-
Constructor Details
-
DtoaBuffer
public DtoaBuffer(int capacity) Create a buffer with the given capacity.- Parameters:
capacity- the capacity of the buffer.
-
-
Method Details
-
reset
public void reset()Clear the buffer contents and set its length to0. -
getRawDigits
Get the raw digits of this buffer as string.- Returns:
- the raw buffer contents
-
getDecimalPoint
public int getDecimalPoint()Get the position of the decimal point.- Returns:
- the decimal point position
-
getLength
public int getLength()Returns the number of characters in the buffer.- Returns:
- buffer length
-
format
-
toString
-