Finding the nearest defibrillator exercise from CodingGames
The main observation I would make is that this code — particularly the for loop — looks very procedural.  To find the minimum of some collection as determined by some metric, use .minBy[B](f: (A) ⇒ B): A.

For readability, avoid interleaving function definitions with the execution flow.  Put all of the definitions first, if possible.

You potentially split each defibrillator input line twice: once to extract the coordinates, then maybe again if you are interested in extracting the name.  I suggest parsing each line once and constructing a case class object from it.

Your sanitizeString function is rather heavy-handed.  To parse French-formatted decimals, use java.text.NumberFormat.

Note that defibrilatorCount is misspelled.

Suggested solution

import math.{cos, sqrt}
import io.StdIn.{readInt, readLine}
import java.text.NumberFormat
import java.util.Locale

object Solution extends App {
  val frenchFmt = NumberFormat.getInstance(Locale.FRANCE)
  def parseDouble(s: String): Double = frenchFmt.parse(s).doubleValue

  case class GeoObject(long: Double, lat: Double, name: String)

  def parseDefibrillator(line: String): GeoObject = {
    val fields = line.split(";")
    GeoObject(parseDouble(fields(4)), parseDouble(fields(5)), fields(1))
  }

  def distanceMetric(a: GeoObject, b: GeoObject): Double = {
    val x = (a.long - b.long) * cos((a.lat + a.lat) / 2)
    val y = a.lat - b.lat
    6371 * sqrt(x * x + y * y)
    // Note: 6371 * sqrt is optional, if just comparing distances
  }

  val player = GeoObject(parseDouble(readLine), parseDouble(readLine), null)
  val count = readInt
  val nearest = (0 until count).map(_ =&gt; parseDefibrillator(readLine))
                               .minBy(distanceMetric(player, _))
  println(nearest.name)
}