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

org.ssssssss.magicapi.utils.PathUtils Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package org.ssssssss.magicapi.utils;

import java.util.regex.Pattern;

public class PathUtils {

	private static final Pattern REPLACE_SLASH_REGX = Pattern.compile("/+");

	/**
	 * 将多个/替换为一个/
	 */
	public static String replaceSlash(String path) {
		return REPLACE_SLASH_REGX.matcher(path).replaceAll("/");
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy