code: public static boolean isEnclosedBetween(final String input, final String leftEncloser, String rightEncloser) {
          if (input == null) {
              throw new IllegalArgumentException("input can't be null");
          }
          if (leftEncloser == null) {
              throw new IllegalArgumentException("leftEncloser can't be null");
          }
          if (rightEncloser == null) {
              throw new IllegalArgumentException("rightEncloser can't be null");
          }
          return input.startsWith(leftEncloser) && input.endsWith(rightEncloser);
      }
docs: Verifies whether String is enclosed by encloser
  
  @param input         The input String
  @param leftEncloser  String which encloses input String at left start
  @param rightEncloser String which encloses input String at the right end
  @return true if enclosed false otherwise