Skip to main content
Module

x/rimbu/mod.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.14.0/mod.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>