Here you can find the source of rightTrimSlashes(String s)
Parameter | Description |
---|---|
s | the input string |
public static String rightTrimSlashes(String s)
//package com.java2s; /**/* w w w.j ava2 s . c om*/ * Copyright (c) 2011 Martin Geisse * * This file is distributed under the terms of the MIT license. */ public class Main { /** * Returns the specified string with all trailing slashes removed. * @param s the input string * @return the trimmed string */ public static String rightTrimSlashes(String s) { while (s.endsWith("/")) { s = s.substring(0, s.length() - 1); } return s; } }