Java tutorial
//package com.java2s; /* * Copyright 2000-2013 Enonic AS * http://www.enonic.com/license */ public class Main { private static String removeExtraSlashes(final String str) { if (str.contains("//")) { return removeExtraSlashes(str.replace("//", "/")); } else { return str; } } }