diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/utils')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt b/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt index 5f245fb6..e2833630 100644 --- a/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt +++ b/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt @@ -200,3 +200,11 @@ fun <T> MutableList<T>.syncWithList(list: List<T>) { } } } + +/** + * Utility extension property to generate a set of strings to simplify the notation when using classes parameter. + */ +val String?.set: Set<String> + get() { + return this?.split(Regex("\\s+"))?.toSet() ?: setOf() + } |