Contact: aviboots(AT)netvision.net.il
43,563 questions
56,781 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 */