com.google.api.control.util.StringUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of endpoints-management-control Show documentation
Show all versions of endpoints-management-control Show documentation
Provide access control for managed services
package com.google.api.control.util;
import com.google.common.base.CharMatcher;
/**
* String utilities.
*/
public final class StringUtils {
/**
* Strips the trailing slash from a string if it has a trailing slash; otherwise return the
* string unchanged.
*/
public static String stripTrailingSlash(String s) {
return s == null ? null : CharMatcher.is('/').trimTrailingFrom(s);
}
private StringUtils() { }
}