How to convert a Scala Map into a formatted string of key/value pairs

I just had a situation where I wanted to convert this Scala Map:

val userPrefs = Map(
    "theme" -> "dark",
    "lang" -> "en"
)

into a formatted String that looks like a collection of key/value pairs, like this:

"theme=dark;lang=en"

In short, I found this to be a good solution:

val userPrefsString = userPrefs
    .map((k, v) => s"${k}=${v}")   // List("theme=dark", "lang=en")
    .mkString(";")

With that code, userPrefsString contains the formatted String I want.