/** * String Formatter Utility * String, phone, file size, and duration formatting functions */ /** * File size formatting options */ export interface FileSizeFormatOptions { decimals?: number; locale?: string; } /** * Formats a file size in bytes to human-readable format * * @param bytes - File size in bytes * @param options - Formatting options * @returns Formatted file size string */ export declare function formatFileSize(bytes: number, options?: FileSizeFormatOptions): string; /** * Duration formatting options */ export interface DurationFormatOptions { format?: 'short' | 'long' | 'digital'; } /** * Formats a duration in seconds to human-readable format * * @param seconds - Duration in seconds * @param options - Formatting options * @returns Formatted duration string */ export declare function formatDuration(seconds: number, options?: DurationFormatOptions): string; /** * Phone number formatting options */ export interface PhoneFormatOptions { format?: 'national' | 'international' | 'e164'; countryCode?: string; } /** * Formats a phone number * * @param phone - Phone number string (digits only) * @param options - Formatting options * @returns Formatted phone number string */ export declare function formatPhone(phone: string, options?: PhoneFormatOptions): string; /** * Truncates text to a maximum length with ellipsis * * @param text - Text to truncate * @param maxLength - Maximum length * @param suffix - Suffix to add (default: '...') * @returns Truncated text */ export declare function truncateText(text: string, maxLength: number, suffix?: string): string; /** * Capitalizes the first letter of a string * * @param text - Text to capitalize * @returns Capitalized text */ export declare function capitalize(text: string): string; /** * Converts a string to title case * * @param text - Text to convert * @returns Title case text */ export declare function toTitleCase(text: string): string; /** * Converts a string to slug format * * @param text - Text to convert * @returns Slug string */ export declare function toSlug(text: string): string;