From bfca1a17addfc3584d7707e9f1bc23edce877f49 Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Fri, 2 Sep 2016 02:33:44 +0300 Subject: [PATCH] rename startIndex => index --- .../src/com/intellij/openapi/util/text/StringUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/util/src/com/intellij/openapi/util/text/StringUtil.java b/platform/util/src/com/intellij/openapi/util/text/StringUtil.java index 69bbc537cc0a..a44ebdf269d4 100644 --- a/platform/util/src/com/intellij/openapi/util/text/StringUtil.java +++ b/platform/util/src/com/intellij/openapi/util/text/StringUtil.java @@ -3155,13 +3155,13 @@ public class StringUtil extends StringUtilRt { } @Nullable - public static LineSeparator getLineSeparatorAt(@NotNull CharSequence text, int startIndex) { - if (startIndex < 0 || startIndex >= text.length()) { + public static LineSeparator getLineSeparatorAt(@NotNull CharSequence text, int index) { + if (index < 0 || index >= text.length()) { return null; } - char ch = text.charAt(startIndex); + char ch = text.charAt(index); if (ch == '\r') { - return startIndex + 1 < text.length() && text.charAt(startIndex + 1) == '\n' ? LineSeparator.CRLF : LineSeparator.CR; + return index + 1 < text.length() && text.charAt(index + 1) == '\n' ? LineSeparator.CRLF : LineSeparator.CR; } return ch == '\n' ? LineSeparator.LF : null; } -- 2.32.0