Contact: aviboots(AT)netvision.net.il
41,397 questions
53,943 answers
573 users
val path = "/directory/project/" val cleanedPath = path.stripSuffix("/") println(cleanedPath) /* run: /directory/project */
val path = "/directory/project/" val cleanedPath = path.replaceAll("/+$", "") println(cleanedPath) /* run: /directory/project */