2019-08-08 19:31:47 +02:00
|
|
|
package exh.util
|
|
|
|
|
|
|
|
|
|
fun List<String>.trimAll() = map { it.trim() }
|
|
|
|
|
fun List<String>.dropBlank() = filter { it.isNotBlank() }
|
|
|
|
|
fun List<String>.dropEmpty() = filter { it.isNotEmpty() }
|
2020-05-04 00:34:46 +02:00
|
|
|
|
|
|
|
|
fun String.removeArticles(): String {
|
|
|
|
|
return this.replace(Regex("^(an|a|the) ", RegexOption.IGNORE_CASE), "")
|
|
|
|
|
}
|