static String format(Iterable<? extends CharSequence> tokens) {
        String sql = StreamSupport.stream(Objects.requireNonNull(tokens).spliterator(), false)
            .filter(Objects::nonNull)
            .map(CharSequence::toString)
            .map(String::trim)
            .filter(s -> !s.isEmpty())
            .collect(Collectors.joining(" "));
        while (sql.endsWith(";")) {
            sql = sql.substring(0, sql.length() - 1);
        }
        return sql;
    }
Formats an sql statement from multiple tokens.<br>
Leading and trailing whitespace is removed from each token and empty tokens ignored.<br>
The tokens are joined using a single blank character to create the sql string.<br>
Finally, any trailing semicolons are removed from the resulting sql.

@param tokens collection of tokens
@return formatted sql string
core/src/main/java/org/jdbi/v3/core/Sql.java