public int compareTo ( final HttpString other ) { if ( orderInt != 0 && other . orderInt != 0 ) { return signum ( orderInt - other . orderInt ) ; } final int len = Math . min ( bytes . length , other . bytes . length ) ; int res ; for ( int i = 0 ; i < len ; i ++ ) { res = signum ( higher ( bytes [ i ] ) - higher ( other . bytes [ i ] ) ) ; if ( res != 0 ) return res ; } // shorter strings sort higher return signum ( bytes . length - other . bytes . length ) ; }
Compare this string to another in a case - insensitive manner .