Skip to content

Commit e4b66be

Browse files
committed
Replace substring with dropLast
1 parent d12c0b0 commit e4b66be

File tree

1 file changed

+1
-1
lines changed
  • kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils

1 file changed

+1
-1
lines changed

kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/NameSuffix.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ internal fun Name.withoutSuffix(suffix: String?): Name? {
1111
if (suffix == null) return null
1212
val identifier = identifier
1313
if (!identifier.endsWith(suffix)) return null
14-
return Name.identifier(identifier.substring(0, identifier.length - suffix.length))
14+
return Name.identifier(identifier.dropLast(suffix.length))
1515
}

0 commit comments

Comments
 (0)