small fix

This commit is contained in:
hexated 2023-03-12 03:39:22 +07:00
parent 08fa378e28
commit dd4da22ab0
2 changed files with 36 additions and 7 deletions

View file

@ -899,9 +899,9 @@ fun Headers.getGomoviesCookies(cookieKey: String = "set-cookie"): Map<String, St
fun String?.createSlug(): String? {
return this?.replace(Regex("[^\\w\\s]"), "")
?.replace(Regex("( )|( -)|(- )"), "-")
?.replace("--", "-")
?.replace(" ", "-")?.lowercase()
?.replace(" ", "-")
?.replace(Regex("( )|( -)|(- )|(--)"), "-")
?.lowercase()
}
fun getLanguage(str: String): String {