int (@NotNull CharSequence text, int start, int end) { int offset = start; while (offset < end) { int oldOffset = offset; for (WhiteSpaceFormattingStrategy strategy : myStrategies) { offset = strategy.check(text, offset, end); if (offset > oldOffset) { break; } } if (offset == oldOffset) { return offset; } } return offset; }