static Cookies fromSetCookieHeaders(ImmutableSet.Builder<Cookie> builder,
                                        boolean strict, Iterator<String> it) {
        assert it.hasNext();
        do {
            final String v = it.next();
            requireNonNull(v, "setCookieHeaders contains null.");
            final Cookie cookie = Cookie.fromSetCookieHeader(strict, v);
            if (cookie != null) {
                builder.add(cookie);
            }
        } while (it.hasNext());

        return Cookies.of(builder.build());
    }
Strips out the trailing 2-char separator from the specified {@link StringBuilder}.

@param buf a buffer where some cookies were encoded.
@return the {@link String} without the trailing separator
core/src/main/java/com/linecorp/armeria/common/CookieUtil.java