Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7DAE5200BC3 for ; Fri, 18 Nov 2016 22:48:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7CABC160B03; Fri, 18 Nov 2016 21:48:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C14AF160B19 for ; Fri, 18 Nov 2016 22:48:00 +0100 (CET) Received: (qmail 82011 invoked by uid 500); 18 Nov 2016 21:47:59 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 81794 invoked by uid 99); 18 Nov 2016 21:47:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2016 21:47:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 40E762C4C78 for ; Fri, 18 Nov 2016 21:47:59 +0000 (UTC) Date: Fri, 18 Nov 2016 21:47:59 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-1288) Add a builder to StringEscapeUtils MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 18 Nov 2016 21:48:01 -0000 [ https://issues.apache.org/jira/browse/LANG-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15677854#comment-15677854 ] ASF GitHub Bot commented on LANG-1288: -------------------------------------- Github user britter commented on a diff in the pull request: https://github.com/apache/commons-lang/pull/213#discussion_r88745694 --- Diff: src/main/java/org/apache/commons/lang3/StringEscapeUtils.java --- @@ -429,6 +429,65 @@ public StringEscapeUtils() { super(); } + /** + *

Convenience wrapper for {@link java.lang.StringBuilder} providing escape methods.

+ * + *

Example:

+ *
    +     * new Builder(ESCAPE_HTML4)
    +     *      .append("<p>")
    +     *      .escape("This is paragraph 1 and special chars like & get escaped.")
    +     *      .append("</p><p>")
    +     *      .escape("This is paragraph 2 & more...")
    +     *      .append("</p>")
    +     *      .toString()
    +     * 
+ * + * @since 3.6 + */ + public static class Builder { + + private final StringBuilder sb; --- End diff -- Actually, I'm now thinking that it may be good to have a real decorator for `Appendables` with decorates any `Appendable` by piping input to the append methods through the translator first. WDYT? > Add a builder to StringEscapeUtils > ---------------------------------- > > Key: LANG-1288 > URL: https://issues.apache.org/jira/browse/LANG-1288 > Project: Commons Lang > Issue Type: New Feature > Reporter: Pascal Schumacher > Priority: Minor > > supplied in patch for LANG-1066 -- This message was sent by Atlassian JIRA (v6.3.4#6332)