Skip to content

Commit 1fd735e

Browse files
committed
fix: micro perf improvement
1 parent 54e500a commit 1fd735e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hx/strings/Strings.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class Strings {
116116
words.push(currentWord.toString());
117117
currentWord.clear();
118118
} else if (ch.isUpperCase()) {
119-
if (chNext.isUpperCase() && chars.length > i + 2) {
119+
if (chNext.isUpperCase() && i + 2 < len) {
120120
if (!chars[i + 2].isUpperCase()) {
121121
words.push(currentWord.toString());
122122
currentWord.clear();

0 commit comments

Comments
 (0)