Replace '-' with '_' in Obj-C prefixes (#1985)
This commit is contained in:
committed by
Nikolay Igotti
parent
dd3ce12e28
commit
7c37f3134f
+4
-1
@@ -436,7 +436,10 @@ private fun ObjCExportMapper.canHaveSameName(first: PropertyDescriptor, second:
|
||||
|
||||
internal val ModuleDescriptor.namePrefix: String get() {
|
||||
// <fooBar> -> FooBar
|
||||
val moduleName = this.name.asString().let { it.substring(1, it.lastIndex) }.capitalize()
|
||||
val moduleName = this.name.asString()
|
||||
.let { it.substring(1, it.lastIndex) }
|
||||
.capitalize()
|
||||
.replace('-', '_')
|
||||
|
||||
val uppers = moduleName.filterIndexed { index, character -> index == 0 || character.isUpperCase() }
|
||||
if (uppers.length >= 3) return uppers
|
||||
|
||||
Reference in New Issue
Block a user