We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75f7683 commit 76eeecdCopy full SHA for 76eeecd
commons/src/main/kotlin/org/fossify/commons/models/contacts/Contact.kt
@@ -173,7 +173,9 @@ data class Contact(
173
}
174
val lastPart = if (startWithSurname) firstMiddle else surname
175
val suffixComma = if (suffix.isEmpty()) "" else ", $suffix"
176
- val fullName = "$prefix $firstPart $lastPart$suffixComma".trim().replace(Regex("\\s+"), " ")
+ val fullName = listOfNotNull(prefix, firstPart, "$lastPart$suffixComma")
177
+ .filter { it.isNotBlank() }
178
+ .joinToString(" ")
179
val organization = getFullCompany()
180
val email = emails.firstOrNull()?.value?.trim()
181
val phoneNumber = phoneNumbers.firstOrNull()?.normalizedNumber
0 commit comments