@bearz/strings
Version:
A collection of string utilities to avoid extra allocations and enable case insensitivity comparisons.
24 lines (23 loc) • 874 B
TypeScript
/**
* The equal module provides functions to compare strings for equality.
* It includes case-sensitive and case-insensitive comparison functions.
*
* @module
*/
import type { CharBuffer } from "@bearz/slices/utils";
/**
* Determines whether the string is equal to the specified other string.
* @param value The string to compare.
* @param other The other string to compare.
* @returns `true` if the strings are equal; otherwise, `false`.
*/
export declare function equal(value: string, other: CharBuffer): boolean;
/**
* Determines whether the string is equal to the specified other string
* using case-insensitive comparison.
*
* @param value The string to compare.
* @param other The other string to compare.
* @returns `true` if the strings are equal; otherwise, `false`.
*/
export declare function equalFold(value: string, other: CharBuffer): boolean;