File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -167,16 +167,21 @@ class StringJSONLexer(private val content: CharSequence) : JSONLexer {
167
167
}
168
168
169
169
private fun skipWhitespace () {
170
- while (! (position >= content.length || ! Character .isWhitespace( content.getChar(position)))) {
170
+ while (! (position >= content.length || ! content.getChar(position).isWhitespace( ))) {
171
171
position++
172
172
}
173
173
}
174
- }
175
174
176
- private fun CharSequence.getChar (index : Int ): Char {
177
- if (index >= this .length) {
178
- return 0 .toChar()
175
+ private fun CharSequence.getChar (index : Int ): Char {
176
+ if (index >= this .length) {
177
+ return 0 .toChar()
178
+ }
179
+
180
+ return this [index]
179
181
}
180
182
181
- return this [index]
182
- }
183
+ private fun Char.isWhitespace (): Boolean {
184
+ return this == ' ' || this == ' \r ' || this == ' \n ' || this == ' \t '
185
+ }
186
+ }
187
+
You can’t perform that action at this time.
0 commit comments