Issue 155 - fix StringIndexOutOfBoundException
This commit is contained in:
parent
0055a503b3
commit
4c499abcdb
@ -8,7 +8,7 @@ import java.util.*
|
||||
|
||||
fun String.toTextDrawableString(): String {
|
||||
val textDrawable = StringBuilder()
|
||||
for (s in this.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()) {
|
||||
for (s in this.split(" ".toRegex()).filter { !it.isEmpty() }.toTypedArray()) {
|
||||
textDrawable.append(s[0])
|
||||
}
|
||||
return textDrawable.toString()
|
||||
|
Loading…
Reference in New Issue
Block a user