[
https://issues.apache.org/jira/browse/LANG-1678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17453025#comment-17453025
]
Gary D. Gregory commented on LANG-1678:
---------------------------------------
Read the method's full Javadoc and the current behavior will make sense.
> StringUtils.split not return as expected
> ----------------------------------------
>
> Key: LANG-1678
> URL: https://issues.apache.org/jira/browse/LANG-1678
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.12.0
> Environment: JDK17
> Reporter: Timing
> Priority: Minor
>
> When I write this code:
> {code:java}
> class Solution{
> public static void main(String[] args) {
> String code = "constant_true";
> System.out.println(StringUtils.split(code,"constant_")[0]);
> }
> }{code}
> I hope it retrun “true".
> But it return “rue”.
> Is it a bug? Should I try to fix it?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)