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

x/rimbu/common/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.0/common/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>