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

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

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

Convert s to a WinOS-compatible NUL-terminated CSTR buffer, dropping any internal NUL characters.

NOTE: supports only ASCII characters, silently dropping non-ASCII-compatible code points without error/panic.

Parameters

s: string