File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
extensionslib/src/main/java/com/omega_r/libs/extensions/string Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -37,22 +37,22 @@ fun String.fromHtml(): Spanned {
3737 }
3838}
3939
40- fun String?.addPartName (partName : String? ): String? {
40+ fun String?.addPartName (partName : String? , separator : String = " " ): String? {
4141 var result = this
4242 if (! partName.isNullOrBlank()) {
4343 if (! result.isNullOrEmpty()) {
44- result + = " $partName "
44+ result + = " $separator $partName"
4545 } else {
4646 result = partName
4747 }
4848 }
4949 return result
5050}
5151
52- fun String?.addPartNames (vararg partNames : String? ): String? {
52+ fun String?.addPartNames (vararg partNames : String? , separator : String = " " ): String? {
5353 var result: String? = this
5454 for (partName in partNames) {
55- result = result.addPartName(partName)
55+ result = result.addPartName(partName, separator )
5656 }
5757 return result
5858}
You can’t perform that action at this time.
0 commit comments