All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.control.util.StringUtils Maven / Gradle / Ivy

There is a newer version: 1.0.14
Show newest version
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() { }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy