code: public static Optional<String> first(final String value, final int n) {
          return Optional.ofNullable(value).filter(v -> !v.isEmpty()).map(v -> v.substring(0, n));
      }
docs: Returns the first n chars of String
  
  @param value The input String
  @param n     Number of chars to return
  @return The first n chars