molstar
Version:
A comprehensive macromolecular library.
15 lines (14 loc) • 955 B
TypeScript
/**
* Copyright (c) 2017-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* Adapted from https://github.com/rcsb/mmtf-javascript
* @author Alexander Rose <alexander.rose@weirdbyte.de>
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { StringLike } from './string-like';
export declare function utf8Write(data: Uint8Array, offset: number, str: string): void;
/** Decode UTF8 data. Return as primitive `string` type, or fail if the result is longer than MAX_STRING_LENGTH. */
export declare function utf8Read(data: Uint8Array, offset?: number, length?: number): string;
/** Decode UTF8 data, potentially exceeding MAX_STRING_LENGTH. Return as primitive `string` if possible; or as `ChunkedBigString` if the result is longer than MAX_STRING_LENGTH. */
export declare function utf8ReadLong(data: Uint8Array, offset?: number, length?: number): StringLike;
export declare function utf8ByteCount(str: string): number;