import { stringWidth } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/workerd/cli.js";
Returns the width of a string.
Examples
Example 1
Example 1
import { stringWidth } from "@ayonli/jsext/cli";
console.log(stringWidth("Hello, World!")); // 13
console.log(stringWidth("你好,世界!")); // 12
console.log(stringWidth("👋🌍🚀♥️♣")); // 8