Documentation
¶
Overview ¶
Package parse has the small text readers that the loaders of package model share: fields, integers and decimal numbers read from byte slices with no allocation (an OBJ file of a million triangles has some seven million of them).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Field ¶
Field returns the first field of the line (the bytes up to the next separator) and the rest of the line after it, or a nil field when the line has no more.
func Float ¶
Float reads a decimal number such as -12, .5, 3.25e-4 or 1E+3. The common numbers (at most 15 digits and a small exponent) are exact by the method of Clinger and take no allocation; the others go to strconv. It is false when the field is not a number. "inf" and "nan" are numbers: the caller says whether it takes them.
func Int ¶
Int reads a decimal integer with an optional sign. It is false for anything else and for a number that does not fit an int32.
Types ¶
This section is empty.