perf improvement

Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/ed55131f
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/ed55131f
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/ed55131f

Branch: refs/heads/master
Commit: ed55131f3679c12b53b45aae3000a7759dcfe4f0
Parents: 18969d7
Author: Amey Jadiye <ameyjad...@gmail.com>
Authored: Mon May 8 23:49:38 2017 +0530
Committer: Amey Jadiye <ameyjad...@gmail.com>
Committed: Mon May 8 23:49:38 2017 +0530

----------------------------------------------------------------------
 src/main/java/org/apache/commons/text/WordUtils.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/ed55131f/src/main/java/org/apache/commons/text/WordUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/WordUtils.java 
b/src/main/java/org/apache/commons/text/WordUtils.java
index 0925227..3765c52 100644
--- a/src/main/java/org/apache/commons/text/WordUtils.java
+++ b/src/main/java/org/apache/commons/text/WordUtils.java
@@ -419,7 +419,7 @@ public class WordUtils {
         int outOffset = 0;
 
         boolean capitalizeNext = true;
-        for (int index = 0; index < str.length();) {
+        for (int index = 0; index < strLen;) {
             final int codePoint = str.codePointAt(index);
 
             if (isDelimiter(codePoint, delimiters)) {
@@ -553,7 +553,7 @@ public class WordUtils {
         int outOffset = 0;
 
         boolean uncapitalizeNext = true;
-        for (int index = 0; index < str.length();) {
+        for (int index = 0; index < strLen;) {
             final int codePoint = str.codePointAt(index);
 
             if (isDelimiter(codePoint, delimiters)) {

Reply via email to