Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/core/main/index.ts>Eq.stringCharCodeEq

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Eq.stringCharCodeEq
import { Eq } from "https://deno.land/x/rimbu@0.13.1/core/main/index.ts";
const { stringCharCodeEq } = Eq;

Returns an Eq instance that considers strings equal when all their charcodes are equal.

Examples

Example 1

const eq = Eq.stringCharCodeEq()
console.log(eq('a', 'a'))
// => true
console.log(eq('abc', 'aBc'))
// => false

Returns

Eq<string>