[ 
https://issues.apache.org/jira/browse/TEXT-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046970#comment-16046970
 ] 

Arun Vinud  commented on TEXT-88:
---------------------------------

I feel all these calls should return the same output.

*WordUtils.capitalizeFully("i am fine") --> I Am Fine*

*WordUtils.capitalizeFully("i am fine", null) --> I Am Fine*

*WordUtils.capitalizeFully("i am fine", new char[]{}) --> I am fine* (Assuming 
the latest change yet to be merged)

Its a bit ambiguous to add space as the default delimiter for the first two 
calls  when we pass null for delimiter array but not when we pass empty 
delimiter array. From a developer perspective passing an empty or null for 
delimiter array would essentially mean they don't have or want any delimiters 
and I feel its kind of proactive not necessarily in a good way to consider 
space as delimiter for the first two cases . What you guys think?

> WordUtils.capitalizeFully behaves in a counterintuitive manner with empty 
> delimiter array.
> ------------------------------------------------------------------------------------------
>
>                 Key: TEXT-88
>                 URL: https://issues.apache.org/jira/browse/TEXT-88
>             Project: Commons Text
>          Issue Type: Bug
>            Reporter: Rob Tompkins
>
> As discussed in TEXT-85, it seems that 
> {code:java}
> WordUtils.capitalizeFully("i am fine", new char[]{}) // --> i am fine
> {code}
> Both Sebb and Arun think that this is odd and that the letter "i" should have 
> been capitalized resulting in the output {{I am fine}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to