Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dxx/src/lib/utils.ts>stringToCWSTR

🚀 (Deno) enhanced executor
Latest
function stringToCWSTR
import { stringToCWSTR } from "https://deno.land/x/dxx@rf/src/lib/utils.ts";

Convert s to WinOS-compatible NUL-terminated wide-character string buffer (using UTF-16 encoding), dropping any internal NUL characters.

Note: assumes/requires WinOS support for UTF-16 (not just UCS-2); ie, requires WinOS >= v5.0/2000.

Parameters

s: string