effect-io-ai

Package: effect
Module: String

String.length

Returns the JavaScript string length, measured in UTF-16 code units.

Example (Getting string length)

import { String } from "effect"
import * as assert from "node:assert"

assert.deepStrictEqual(String.length("abc"), 3)

Signature

declare const length: (self: string) => number

Source

Since v2.0.0