private String extractString ( char [ ] data , int start , int end ) { // skip leading whitespace and quotes while ( start < end && ( ' ' == data [ start ] || ' ' == data [ start ] || ' ' == data [ start ] ) ) { start ++ ; } // ignore trailing whitespace and quotes while ( end >= start && ( ' ' == data [ end ] || ' ' == data [ end ] || ' ' == data [ end ] ) ) { end -- ; } // check for nothing but whitespace if ( end < start ) { return null ; } int len = end - start + 1 ; String rc = Normalizer . normalize ( new String ( data , start , len ) , Normalizer . NORMALIZE_LOWER ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "extractString: [" + rc + "]" ) ; } return rc ; }
Extract a string from the input array based on the start and end markers . This will strip off any leading and trailing white space or quotes .