Java tutorial
//package com.java2s; /* * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ public class Main { /** * Normalizes the namespace. * * @param namespace the namespace to normalize. * @return normalized namespace. */ private static String normalizeNamespace(String namespace) { if (namespace.endsWith("/")) { return namespace.substring(0, namespace.length() - 1); } return namespace; } }