question: private static boolean compareSentences ( String oo , String no ) { char [ ] ochars = oo . toCharArray ( ) ; char [ ] nchars = no . toCharArray ( ) ; int oindex = 0 ; int nindex = 0 ; while ( true ) { if ( oindex == ochars . length ) if ( nindex == nchars . length ) { return true ; } else return false ; else { if ( nindex == nchars . length ) return false ; } if ( ochars [ oindex ] != nchars [ nindex ] ) { if ( oindex > 0 && nindex > 0 && ochars [ oindex - 1 ] == '\'' && nchars [ nindex - 1 ] == '\'' && nchars [ nindex ] == ' ' ) { nindex ++ ; continue ; } else if ( ochars [ oindex ] == '\'' && nchars [ nindex ] == ' ' ) { nindex ++ ; continue ; } else if ( nchars [ nindex ] == '\'' && ochars [ oindex ] == ' ' ) { oindex ++ ; continue ; } else { return false ; } } else { ++ oindex ; ++ nindex ; } } }
target:  comprare two strings ignoring differences in "'"s and their relative positions and white space.