OK, I will initiate a PR. Some of the added methods will be more useful than others. The PR will come from speters33w.
Thank you, Stephan Peters On Tue, Apr 9, 2024 at 5:31 PM Gary Gregory <garydgreg...@gmail.com> wrote: > Hello Stephan, > > The best way to see what you are proposing is a PR, it's a bit painful to > see differences otherwise, at least for me. > > That said anything new should solve a real world use case, not merely > something that might be useful (or not) 😉 > > I think seeing tests in a PR will help clarify what it is you are proposing > that the current code doesn't do. > > See also also https://github.com/apache/commons-text/pull/450 > > TY, > Gary > > On Tue, Apr 9, 2024, 4:37 PM Stephan Peters > <stephan.pet...@csuglobal.edu.invalid> wrote: > > > I added several methods to the org.apache.commons.CaseUtils class I think > > would be very useful, for example to use for normalized naming > conventions > > for file paths, file names, URLs, etc. > > > > I'm planning on initiating a pull request. > > > > I would like to discuss it here. > > > > I've posted it in a fork here: > > > > > https://github.com/speters33w/commons-text/blob/master/src/main/java/org/apache/commons/text/CaseUtils.java > > > > and written new tests for all the methods that pass here: > > > > > https://github.com/speters33w/commons-text/blob/master/src/test/java/org/apache/commons/text/CaseUtilsTest.java > > > > There is an example of the method return values at the top of the revised > > CaseUtils.java. > > > > The methods have a little different behavior than the existing > > toCamelCase(String, boolean, char[]) (which I left intact) in that they > > normalize the input first before processing, so toCamelSnakeCase("The > > café’s piñata gave me déjà vu.") will return > > "the_Cafes_Pinata_Gave_Me_Deja_Vu" > > > > The main driver engine is in the toTitleCase() method and the rest of the > > methods piggyback on that engine and perform minor changes to the return > > value. > > > > If anyone feels like taking a look, I'd appreciate any feedback. > > > > Thank you. > > > > Stephan Peters > > >