private boolean containsAll ( String s , int i ) { if ( i >= s . length ( ) ) { return true ; } int cp = UTF16 . charAt ( s , i ) ; if ( contains ( cp ) && containsAll ( s , i + UTF16 . getCharCount ( cp ) ) ) { return true ; } for ( String setStr : strings ) { if ( s . startsWith ( setStr , i ) && containsAll ( s , i + setStr . length ( ) ) ) { return true ; } } return false ; }
Recursive routine called if we fail to find a match in containsAll and there are strings