You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/08/10 10:06:46 UTC

[GitHub] [commons-lang] sebbASF commented on pull request #565: [LANG-1576] refine StringUtils.chomp

sebbASF commented on pull request #565:
URL: https://github.com/apache/commons-lang/pull/565#issuecomment-671269648


   Thanks - much easier to see what has been changed now.
   i.e. cache the string length, and don't use substring unless it is needed.
   
   I don't think the RandomStrings test is a fair benchmark.
   The behaviour of the method depends only on the last one or two characters (and the length).
   AFAICT the strings are not random and don't have a mix of line-endings.
   So I think the test only measures the efficiency of String.substring where nothing needs to be dropped.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org