normalise_im_address
Description:
public static string normalise_im_address (string im_address, string protocol) throws ImDetailsError
Normalise an IM address so that it's suitable for string comparison.
IM addresses for various protocols can be represented in different ways, only one of which is canonical. In order to allow simple string comparisons of IM addresses to work, the IM addresses must be normalised beforehand.
If the provided IM address is invalid, Folks.ImDetailsError.INVALID_IM_ADDRESS will be thrown. Note that this isn't guaranteed to be thrown for all invalid addresses, but if it is thrown, the address is guaranteed to be invalid.
Parameters:
im_address |
the address to normalise |
protocol |
the protocol of this im_address |
Exceptions:
Folks.ImDetailsError |
if the provided IM address was invalid |
Since:
0.2.0