You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "devson (JIRA)" <ji...@apache.org> on 2018/06/11 07:45:00 UTC

[jira] [Updated] (LANG-1399) Split fails on word boundaries

     [ https://issues.apache.org/jira/browse/LANG-1399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

devson updated LANG-1399:
-------------------------
    Environment: Produced on v3.7 with Java 8, running Windows. But this may be produced in any environment  (was: I'm working with the latest version of Apache Commons lib. with Java 8)

> Split fails on word boundaries
> ------------------------------
>
>                 Key: LANG-1399
>                 URL: https://issues.apache.org/jira/browse/LANG-1399
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.x
>         Environment: Produced on v3.7 with Java 8, running Windows. But this may be produced in any environment
>            Reporter: devson
>            Priority: Major
>
> StringUtils.split does not behave correctly when the split is to be performed on word boundary characters ("\b"). Steps to produce the bug:
> String string = "foo<bar>foofoo";
> String[] st=StringUtils.split(string, "\b");
> Expected o/p:
> foo
> <
> bar
> >
> foofoo
>  
> Actual o/p:
> foo<bar>foofoo
> The issue seems to be with how zero-width separators are being handled. Note that Java library's String.split gives the expected output.
> Thanks.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)