UNPKG

@ahmic/autoit-js

Version:
15 lines (14 loc) 629 B
/** * Allocates a new buffer of the given size plus one for the null terminator. * * @param characters The number of characters to make space for, excluding the null terminator. * * @returns A tuple containing the buffer and the total number of characters including the null terminator. */ export declare function createUnicodeBuffer(characters: number): [Buffer, number]; /** * Converts a buffer containing a `UTF-16LE` string to a JavaScript string. * * @param buffer The buffer containing the `UTF-16LE` string. */ export declare function unicodeBufferToString(buffer: Buffer, trimNullTerminator?: boolean): string;