private fun writeKeysWithPrefix(prefix: String, exclude: String) { for (key in keys) { if (key.startsWith(prefix) && !key.startsWith(exclude)) { ps.println(key + "=" + prop.getProperty(key)) } } ps.println() }
writes all keys starting with the specified prefix and not starting with the exclude prefix in alphabetical order .