code: static boolean isFunctionInFormula(String formula, String function) {
          String filteredFormula = formula.replace(POI_FUNCTION_PREFIX, "");
          return filteredFormula.startsWith(function) && filteredFormula.replace(function, "").startsWith("(");
      }
docs: Checks if formula string contains given function.