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 79D84200CA3 for ; Thu, 1 Jun 2017 17:02:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 78789160BC4; Thu, 1 Jun 2017 15:02:16 +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 C09EC160BDF for ; Thu, 1 Jun 2017 17:02:15 +0200 (CEST) Received: (qmail 5254 invoked by uid 500); 1 Jun 2017 15:02:03 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 4957 invoked by uid 99); 1 Jun 2017 15:02:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2017 15:02:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 26761C67BE for ; Thu, 1 Jun 2017 15:02:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.18 X-Spam-Level: * X-Spam-Status: No, score=1.18 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id DZF61bwACjYu for ; Thu, 1 Jun 2017 15:02:02 +0000 (UTC) Received: from mail-qk0-f173.google.com (mail-qk0-f173.google.com [209.85.220.173]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2F8985F5B3 for ; Thu, 1 Jun 2017 15:02:02 +0000 (UTC) Received: by mail-qk0-f173.google.com with SMTP id p66so21848696qkf.3 for ; Thu, 01 Jun 2017 08:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=TL6UG+8eUi3I2LTB6EWKNcf/7+OGsjPgcpiPB73Luxg=; b=gDMcXAXuSaZD2uiybwTChjHmDPh6PmGvWl2tN7e4Q/JYa1WuQI6ZFSRMAFGxmu1Kc8 nc8dB6jLAEZ0JTRntqe5awCQ0k3VQaGsO4SMkpwpUBAg+JMxP3MADtqk03K1GX4Ar+Wj wpxSiB6JKR84xnOg0FJ3sKBdco1/JrW3IqzpfEGWDWuTU7Y7qQd45iZvtq9jrxqzhJEl PyULftBgpbZSvsDdtlIPRTV2wpGhZK6YdT5qrwiTa5laXd4NJpifeE6+KJY5WogZDTF7 fZoCMlbMGM3K3xBbHgcW2vHyNTdMBA3HclIcgaOSuvp8iw+X8hmrowb3f1ZfR1SMQhdk QRsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=TL6UG+8eUi3I2LTB6EWKNcf/7+OGsjPgcpiPB73Luxg=; b=eDcVJCQ06UCOEFFWhH8P18dsw0/E//Vo0lYJSKQvVkNBSgCc/sLqobJRHHO2qELKK0 NtFUoXQyzAIZRNTIhbKWj5jZFAMjvFbQqp2NLBiqClEBxzDNFztIXx3//yF1UcCj7SZe drspCjuP64jgphBcSbW3U+T8NxJHsi8uikzUUqtsGwMIZ38aNshGl4UxeeaYD+JJ5Rld SlZhd9hH/Scs7wyLmNcHjZhE4mDSmGvjJy/QPjoHG+pAbyp4uTexZxbC2AmB0wAzMY3I dz0CgP3J2+PVcxJ/RxvdObDa5mroM6I6SZ4ytrF8EHAtytp6+PRn3S1OiWGyCMrzQJOJ NB8A== X-Gm-Message-State: AKS2vOwKC+qsbvoYoW7+jJTysx89F/MHTJtSU63XwG83cdFfePRQs5oN JxM9tr+97XR5BwD+BO0= X-Received: by 10.55.150.71 with SMTP id y68mr2418956qkd.193.1496329321355; Thu, 01 Jun 2017 08:02:01 -0700 (PDT) Received: from [172.25.162.179] ([199.244.219.64]) by smtp.gmail.com with ESMTPSA id n1sm8082684qkc.1.2017.06.01.08.02.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 08:02:00 -0700 (PDT) From: Rob Tompkins Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [lang] Appetite for new method StringUtils.toCamelCase(String str, char delimiter, boolean capitalizeFirstLetter) Date: Thu, 1 Jun 2017 11:02:02 -0400 References: <910772F4-308B-4EAB-BB97-040628075D7A@gmail.com> To: Commons Developers List In-Reply-To: Message-Id: <51B56C91-A6F6-46D0-A083-1946A7B8B997@gmail.com> X-Mailer: Apple Mail (2.3273) archived-at: Thu, 01 Jun 2017 15:02:16 -0000 > On Jun 1, 2017, at 10:58 AM, Roger Whitcomb = wrote: >=20 > I have a similar method in our code -- the use case is to take user = input (plain English field names, for instance) and turn it into = variable names for DTOs (or similar). >=20 > Another use we have for it is taking Java format ENUM_NAMES and = turning them into camelCaseVariableNames for things like dynamic = property sheets. This is quite similar to what we are doing as well. and @Gary - I like both ideas, WordUtils or CamelCaseUtils. -Rob >=20 > ~Roger Whitcomb >=20 > -----Original Message----- > From: Duncan Jones [mailto:duncan@wortharead.com]=20 > Sent: Thursday, June 01, 2017 7:32 AM > To: Commons Developers List > Subject: Re: [lang] Appetite for new method = StringUtils.toCamelCase(String str, char delimiter, boolean = capitalizeFirstLetter) >=20 > On Thu, 1 Jun 2017 at 15:27, Gary Gregory = wrote: >=20 >> IMO camel casing is all about words so [text] WordUtils. But why not=20= >> have a CamelCaseUtils instead? >>=20 >> Gary >=20 >=20 > +1. IMO it belongs in TEXT (if anywhere) and we should avoid classes=20= > +with > static methods. >=20 > Per our other conservation about case conversions, we should carefully = specify whether this uses upper- or title-case and how it behaves in = different locales. >=20 > OOI, what is your real world use case for this? >=20 > Duncan >=20 >=20 >>=20 >> On Jun 1, 2017 7:14 AM, "Rob Tompkins" wrote: >>=20 >>>=20 >>>> On Jun 1, 2017, at 10:11 AM, Gary Gregory >>> wrote: >>>>=20 >>>> Isn't this kind of stuff or anything camel case supposed to be in >> [text] >>>=20 >>> I=E2=80=99m ok with that path as well. It feels like it=E2=80=99s on = the line=20 >>> between the two components. Either way, it sounds like you=E2=80=99re = not=20 >>> opposed to adding >> it >>> to a component. >>>=20 >>> Should it be TextUtils.toCamelCase(String str, char delimiter,=20 >>> boolean capitalizeFirstLetter), or WordUtils maybe, if we were to=20 >>> put it in >> [text]? >>>=20 >>> -Rob >>>=20 >>>> these days? >>>>=20 >>>> Gary >>>>=20 >>>> On Jun 1, 2017 7:03 AM, "Rob Tompkins" wrote: >>>>=20 >>>>> Hello all, >>>>>=20 >>>>> Folks at my day job have a method that takes in a space delimited >> String >>>>> (or arbitrarily delimited string for that matter), and returns a=20= >>>>> camel cased string. Is there any reason that this shouldn=E2=80=99t = be in >>> StringUtils? It >>>>> feels reasonable to me. What are folks thoughts? >>>>>=20 >>>>> Cheers, >>>>> -Rob >>>>> ----------------------------------------------------------------- >>>>> ---- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>>> For additional commands, e-mail: dev-help@commons.apache.org >>>>>=20 >>>>>=20 >>>=20 >>>=20 >>> -------------------------------------------------------------------- >>> - To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>> For additional commands, e-mail: dev-help@commons.apache.org >>>=20 >>>=20 >>=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org