Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 141CC17403 for ; Fri, 3 Apr 2015 18:23:55 +0000 (UTC) Received: (qmail 70831 invoked by uid 500); 3 Apr 2015 18:23:54 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 70705 invoked by uid 500); 3 Apr 2015 18:23:54 -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 70452 invoked by uid 99); 3 Apr 2015 18:23:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2015 18:23:54 +0000 Date: Fri, 3 Apr 2015 18:23:53 +0000 (UTC) From: "Marco Janc (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (LANG-1108) Function to replace multiple whitespaces by a character and trim MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Marco Janc created LANG-1108: -------------------------------- Summary: Function to replace multiple whitespaces by a character and trim Key: LANG-1108 URL: https://issues.apache.org/jira/browse/LANG-1108 Project: Commons Lang Issue Type: Improvement Components: lang.* Reporter: Marco Janc In form applications where user can input data its very often not wished to have successive whitespace characters. A function that will replace multiple whitespace characters with a single space (or passed string/character) would be a nice feature since I myself repeat this method in many applications. Something like a shortcut for: value.replace("\\s+", " ").trim() -- This message was sent by Atlassian JIRA (v6.3.4#6332)