import { Any, Json } from './types';
export declare const GUID_REGEX: RegExp;
export declare const ELLIPSIS = "\u2026";
/**
* Check if a string is a valid GUID.
*
* @param guid - The string to check.
* @returns - True if the string is a valid GUID.
*/
export declare function isGuid(guid: string): boolean;
/**
* Decode HTML entities like in a string.
*
* @param html - The string to decode.
* @returns - The decoded string.
*/
export declare function decodeHtmlEntities(html: string): string;
/**
* Remove HTML tags from a string.
*
* @param text - The string to remove tags from.
* @param exceptions - The tags to keep.
* @returns - The string with the tags removed.
*/
export declare function removeHtmlTags(text: string, ...exceptions: string[]): string;
/**
* Escape special characters in a string for use in a regular expression.
*
* @param text - The string to escape.
* @returns - The escaped string.
*/
export declare function escapeRegExp(text?: string): string | undefined;
/**
* Mark matches in a string with HTML tags (or other markers).
*
* @param text - The string to mark.
* @param mark - The string to mark.
* @param before - The HTML tag to add before the match (default: "").
* @param after - The HTML tag to add after the match (default: "").
* @returns - The string with the matches marked.
*/
export declare function markMatches(text?: string, mark?: string, before?: string, after?: string): string;
/**
* Truncate a string to a specified length.
*
* @param text - The string to truncate.
* @param length - The maximum length of the truncated string.
* @param ellipsis - The string to append to the truncated string (default: "…").
* @returns - The truncated string.
*/
export declare function truncate(text: string, length: number, ellipsis?: string): string;
/**
* Remove duplicate values from a string list.
*
* @param text - The string list to remove duplicates from.
* @param delimiter - The character that separates the values (default: ",").
* @param joiner - The character that joins the values back together (default: delimiter + " ").
* @returns - A string list with duplicates removed.
*/
export declare function removeDuplicates(text: string, delimiter?: string, joiner?: string): string;
export declare function toBase64(string: string): string;
export declare function fromBase64(b64: string): string;
export declare function jsonToBase64(obj: T, replacer?: (key: string, value: Any) => Any): string;
export declare function base64ToJson(b64: string, reviver?: (key: string, value: Any) => Any): T;
/**
* Return the size of the specified string in kilobytes.
*
* @param str - The string to measure.
* @param asB64 - Whether to measure the size as base64 (default: true).
* @returns - The size of the string in kilobytes.
*/
export declare function size(str: string, asB64?: boolean): number;
/**
* Convert a size in kilobytes to a character count.
*
* @param kb - The size in kilobytes.
* @param asB64 - Whether to convert as base64 (default: true).
* @returns - The character count.
*/
export declare function sizeToChars(kb: number, asB64?: boolean): number;
/**
* Convert a character count to a size in kilobytes.
*
* @param chars - The character count.
* @param asB64 - Whether to convert as base64 (default: true).
* @returns - The size in kilobytes.
*/
export declare function charsToSize(chars: number, asB64?: boolean): number;