public static unsafe IntPtr js_strndup(JSContext ctx, string str) { var bytes = Utils.TextUtils.GetNullTerminatedBytes(str); fixed(byte *ptr = bytes) { return(JSApi.js_strndup(ctx, ptr, bytes.Length - 1)); } }
public static unsafe IntPtr js_strndup(JSContext ctx, string str) { var bytes = Utils.TextUtils.GetNullTerminatedBytes(str); fixed(byte *ptr = bytes) { return(JSApi.js_strndup(ctx, ptr, bytes.Length - 1)); } }