commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devika (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-1399) Split fails on word boundaries
Date Mon, 11 Jun 2018 07:40:00 GMT
Devika created LANG-1399:
----------------------------

             Summary: 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: I'm working with the latest version of Apache Commons lib. with Java
8
            Reporter: Devika


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)

Mime
View raw message