Contact: aviboots(AT)netvision.net.il
43,835 questions
57,202 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 */