Class PathUtils

java.lang.Object
dev.relism.flash.routing.PathUtils

public class PathUtils extends Object
  • Constructor Details

    • PathUtils

      public PathUtils()
  • Method Details

    • sanitize

      public static String sanitize(String path)
      Sanitizes a path segment to ensure it starts with '/' and has no trailing slash. Replaces multiple slashes with a single one.
    • join

      public static String join(String base, String path)
      Joins two path segments and ensures the result is sanitized. Prevents "double namespace" if the path already starts with the base.