static String toFormattedString ( final String iban ) { final StringBuilder ibanBuffer = new StringBuilder ( iban ) ; final int length = ibanBuffer . length ( ) ; for ( int i = 0 ; i < length / 4 ; i ++ ) { ibanBuffer . insert ( ( i + 1 ) * 4 + i , ' ' ) ; } return ibanBuffer . toString ( ) . trim ( ) ; }
Returns formatted version of Iban .