Documentation
¶
Overview ¶
Package literal implements conversions to and from string representations of basic data types.
Index ¶
Constants ¶
View Source
const ( K = mulDec | mul1 M = mulDec | mul2 G = mulDec | mul3 T = mulDec | mul4 P = mulDec | mul5 E = mulDec | mul6 Z = mulDec | mul7 Y = mulDec | mul8 Ki = mulBin | mul1 Mi = mulBin | mul2 Gi = mulBin | mul3 Ti = mulBin | mul4 Pi = mulBin | mul5 Ei = mulBin | mul6 Zi = mulBin | mul7 Yi = mulBin | mul8 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Multiplier ¶ added in v0.1.0
type Multiplier byte
A Multiplier indicates a multiplier indicator used in the literal.
type NumInfo ¶ added in v0.1.0
type NumInfo struct { UseSep bool // contains filtered or unexported fields }
NumInfo contains information about a parsed numbers.
Reusing a NumInfo across parses may avoid memory allocations.
func (*NumInfo) Multiplier ¶ added in v0.1.0
func (p *NumInfo) Multiplier() Multiplier
Multiplier reports which multiplier was used in an integral number.
type QuoteInfo ¶
type QuoteInfo struct {
// contains filtered or unexported fields
}
QuoteInfo describes the type of quotes used for a string.
func ParseQuotes ¶
ParseQuotes checks if the opening quotes in start matches the ending quotes in end and reports its type as q or an error if they do not matching or are invalid. nStart indicates the number of bytes used for the opening quote.
Click to show internal directories.
Click to hide internal directories.