You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Devika (JIRA)" <ji...@apache.org> on 2018/06/11 07:40:00 UTC
[jira] [Created] (LANG-1399) Split fails on word boundaries
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)