stringzy
Version:
A versatile string manipulation library providing a range of text utilities for JavaScript and Node.js applications.
10 lines (9 loc) • 540 B
TypeScript
/**
* Hides a segment of a string by replacing it with a specified character.
* @param text The input string.
* @param maskStart The start index of the segment to mask (inclusive). Defaults to 0.
* @param maskEnd The end index of the segment to mask (exclusive). Defaults to text.length.
* @param maskChar The character to use for masking. Defaults to '*'.
* @returns The string with the specified segment masked.
*/
export declare function maskSegment(text: string, maskStart?: number, maskEnd?: number, maskChar?: string): string;