code: public String findWithinHorizon(String pattern, int horizon) {
          return findWithinHorizon(patternCache.forName(pattern), horizon);
      }
docs: Attempts to find the next occurrence of a pattern constructed from the
  specified string, ignoring delimiters.
  
  <p>An invocation of this method of the form
  <tt>findWithinHorizon(pattern)</tt> behaves in exactly the same way as
  the invocation
  <tt>findWithinHorizon(Pattern.compile(pattern, horizon))</tt>.
  
  @param pattern a string specifying the pattern to search for
  @param horizon the search horizon
  @return the text that matched the specified pattern
  @throws IllegalStateException if this scanner is closed
  @throws IllegalArgumentException if horizon is negative