Converts digits between different locales
@param digits The digits to convert
@param from Source locale
@param to Target locale
@returns String Converted digits
Example: PersianTools.convertDigits("123", DigitLocale.en, DigitLocale.fa) => "۱۲۳"
Formats bank card number
@param cardNumber The card number to format
@returns String? Formatted card number or null if invalid
Example: PersianTools.formatCardNumber("6219861034567890") => "6219-8610-3456-7890"
Formats phone number
@param phoneNumber The phone number to format
@returns String? Formatted phone number or null if invalid
Example: PersianTools.formatPhoneNumber("09123456789") => "+98912-345-6789"
Gets bank information from IBAN
@param sheba The IBAN number
@returns BankInfo? Bank information or null if invalid
Example: PersianTools.getBankFromSheba("IR123456789012345678901234") => BankInfo(...)
Gets bank name from card number
@param cardNumber The card number
@returns String? Bank name or null if not found
Example: PersianTools.getBankNameFromCard("6219861034567890") => "بانک سامان"
Validates phone number and returns operator details
@param phoneNumber The phone number to validate
@returns OperatorDetail? Operator details or null if invalid
Example: PersianTools.getPhoneDetails("09123456789") => OperatorDetail(...)
Checks if the input string contains any Persian characters
@param input The string to check
@param complex Whether to use complex Persian character set
@returns bool True if input contains Persian characters
Example: PersianTools.hasPersian("Hello سلام") => true
Validates if the input string contains only Persian characters
@param input The string to validate
@param complex Whether to use complex Persian character set
@returns bool True if input is valid Persian text
Example: PersianTools.isPersian("سلام") => true
Validates Iranian IBAN (Sheba) number
@param sheba The IBAN number
@returns bool True if valid
Example: PersianTools.isShebaValid("IR123456789012345678901234") => true
Converts number to Persian words
@param number The number to convert
@param ordinal Whether to use ordinal form
@returns String? Converted number or null if invalid
Example: PersianTools.numberToWords(123) => "یکصد و بیست و سه"
Replaces patterns in string using a map
@param input The input string
@param mapPattern Map of patterns to replacements
@returns String String with replaced patterns
Example: PersianTools.replaceMapValue("شیش صد", {"شیش صد": "ششصد"}) => "ششصد"
Trims whitespace from start and end of string
@param input The string to trim
@returns String Trimmed string
Example: PersianTools.trim(" hello ") => "hello"
Validates Iranian bank card number
@param cardNumber The card number to validate
@returns bool True if valid
Example: PersianTools.validateCardNumber("6219861034567890") => true
Validates Iranian national ID
@param id The national ID to validate
@returns bool True if valid
Example: PersianTools.verifyNationalId("1234567890") => false
Converts Persian number words to number
@param words The words to convert
@param digits Output digit format
@param addComma Whether to add commas to output
@returns String? Converted number or null if invalid
Example: PersianTools.wordsToNumberString("یکصد و بیست و سه") => "123"