Skip to content

Instantly share code, notes, and snippets.

@kinisoftware
Created October 14, 2019 17:41
Show Gist options
  • Select an option

  • Save kinisoftware/529a257ad012f0e604a4a10d57a78c8b to your computer and use it in GitHub Desktop.

Select an option

Save kinisoftware/529a257ad012f0e604a4a10d57a78c8b to your computer and use it in GitHub Desktop.
Utils.kt
object Utils {
fun getLanguage(locale: String) = locale.substringBefore('-')
fun getRegion(locale: String) = locale.substringAfter('-')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment