feat(types-ios): add interop type for stringFromCString (#10494)

This commit is contained in:
Eduardo Speroni
2024-04-02 16:30:22 -03:00
committed by GitHub
parent d67d297e37
commit 0c8c945b33

View File

@@ -76,6 +76,14 @@ declare module interop {
*/
function bufferFromData(data: NSData): ArrayBuffer;
/**
* Converts a CString to a JavaScript string.
* @param cString A pointer to a CString.
* @param lengthInBytes The length of the string in bytes. UTF-8 characters may be more than one byte. If not provided the string is assumed to be null-terminated.
* @returns A JavaScript string with length <= lengthInBytes.
*/
function stringFromCString(cString: Pointer | Reference<number>, lengthInBytes?: number): string;
/**
* A type that wraps a pointer and allows read/write operations on its value.
*/