Suggest to replace 'substring' calls by take/drop/dropLast calls when possible
Code review fixes #KT-10196 Fixed
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
class A() {
|
||||
fun bar(): String = null!!
|
||||
}
|
||||
|
||||
fun foo(a: A) {
|
||||
a.bar().substring<caret>(0, a.bar().indexOf('x'))
|
||||
}
|
||||
Reference in New Issue
Block a user