The ways I know is to parse yaml into the Object, ...
# announcements
m
The ways I know is to parse yaml into the Object, but I need only Map<String, int>
d
Copy code
val map = file.split(Regex("[\r\n]+"))
    .filterNot { it.startsWith('#') }
    .map { it.split('=', limit=2).map(String::trim) }
    .map { it[0] to it[1] }
    .toMap()
m
Thanks
d
Can probably be optimized, but that's the general idea