formatPhoneNumber

fun formatPhoneNumber(phoneNumber: String, countryCode: String): String?

Formats the phone number based on the provided country code.

Return

A formatted phone number as a String, or null if the input is blank.

Parameters

phoneNumber

The phone number to format.

countryCode

The country code to prepend if the phone number starts with "0".