UNPKG

uae-dap

Version:

Debug Adapter Protocol for Amiga development with FS-UAE or WinUAE

71 lines (70 loc) 2.4 kB
/** * Chunks a string * @param str String to chunk * @param n Array of check elements */ export declare function chunk(str: string, n: number): string[]; /** * Converts a byte to a character * @param byte byte to convert * @return character in string */ export declare function byteToASCII(byte: number): string; /** * Converts a string containing hex values to an ascii string * @param value string to convert * @param chunkSize Size of the chuck of hex values * @return ascii string */ export declare function hexStringToASCII(value: string, chunkSize: number): string; /** * Converts a int32 in an array of bytes * @param num Number to convert * @return array of bytes */ export declare function int32ToBytes(num: number): Array<number>; /** * Converts a int 32 to an ascii string * @param value integer to convert * @return ascii string */ export declare function int32ToASCII(value: number): string; /** * Convert a hex string to a byte array **/ export declare function hexToBytes(hex: string): Array<number>; /** * Convert a byte array to a hex string **/ export declare function bytesToHex(bytes: Array<number>): string; /** * Convert a hex string to a base64 string **/ export declare function hexToBase64(hexString: string): string; /** * Convert a base64 string to a hex string **/ export declare function base64ToHex(base64String: string): string; /** * Compare two strings. * @param a First string * @param b Second string * @return <0 if a>b, 0 if a=b, >0 if a<b */ export declare function compareStringsLowerCase(a: string, b: string): number; export declare function formatHexadecimal(value: number, pad?: number): string; export declare function formatBinary(value: number, pad?: number): string; export declare function formatAddress(value: number): string; export declare function formatDecimal(value: number): string; export declare enum NumberFormat { BINARY = 0, DECIMAL = 1, HEXADECIMAL = 2 } export declare function formatNumber(value: number, displayFormat?: NumberFormat, minBytes?: number): string; export declare function splitLines(value: string): string[]; export declare function bitValue(num: number, hi: number, lo?: number): number; /** * String replace with async callback */ export declare function replaceAsync(str: string, regex: RegExp, asyncFn: (match: string, ...args: any[]) => Promise<string>): Promise<string>;