segment

fun segment(place: String, lowercased: Boolean): String?(source)

Letters and digits in any script kept as they are (æ, ø, å, ü, 東京), _ and - kept, anything else dropped, lowercased when asked. Subdivisions keep their case ("WA"); cities follow the community's lowercase convention. Null when nothing is left. Communities write their roots in their own letters (msh/EU_868/NO/Østlandet), so a suggestion does the same rather than folding to ASCII.