mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(types-ios): add interop type for stringFromCString (#10494)
This commit is contained in:
8
packages/types-ios/src/lib/ios/interop.d.ts
vendored
8
packages/types-ios/src/lib/ios/interop.d.ts
vendored
@@ -76,6 +76,14 @@ declare module interop {
|
|||||||
*/
|
*/
|
||||||
function bufferFromData(data: NSData): ArrayBuffer;
|
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.
|
* A type that wraps a pointer and allows read/write operations on its value.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user