UNPKG

molstar

Version:

A comprehensive macromolecular library.

27 lines (26 loc) 1.08 kB
/** * Copyright (c) 2017-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> * @author Alexander Rose <alexander.rose@weirdbyte.de> * * based in part on https://github.com/dsehnal/CIFTools.js */ /** * Efficient integer and float parsers. * * For the purposes of parsing numbers from the mmCIF data representations, * up to 4 times faster than JS parseInt/parseFloat. */ export declare function parseIntSkipLeadingWhitespace(str: string, start: number, end: number): number; export declare function parseInt(str: string, start: number, end: number): number; export declare function parseFloatSkipLeadingWhitespace(str: string, start: number, end: number): number; export declare function parseFloat(str: string, start: number, end: number): number; export declare const enum NumberType { Int = 0, Float = 1, Scientific = 2, NaN = 3 } /** The whole range must match, otherwise returns NaN */ export declare function getNumberType(str: string): NumberType;