private static int minLen ( String ... patterns ) { int minLen = patterns [ 0 ] . length ( ) ; for ( String str : patterns ) { if ( str . length ( ) < minLen ) { minLen = str . length ( ) ; } } return minLen ; }
Find the shortest of all patterns .