public static String normalisedVersion ( String version , String sep , int maxWidth ) { if ( version == null ) { return null ; } String [ ] split = Pattern . compile ( sep , Pattern . LITERAL ) . split ( version ) ; StringBuilder sb = new StringBuilder ( ) ; for ( String s : split ) { sb . append ( String . format ( "%" + maxWidth + ' ' , s ) ) ; } return sb . toString ( ) ; }
Normalizes a version string .