Format IBANs

import ch.codeblock.qrinvoice.util.IbanUtils;

// ...

System.out.println(IbanUtils.formatIban("CH3908704016075473007"));
System.out.println(IbanUtils.formatIban("CH39 0870 4016 0754 7300 7"));
// prints "CH39 0870 4016 0754 7300 7"

Normalize IBANs

import ch.codeblock.qrinvoice.util.IbanUtils;

// ...

System.out.println(IbanUtils.normalizeIBAN("CH39 0870 4016 0754 7300 7"));
// prints "CH3908704016075473007"