uJoinPath function

String uJoinPath(
  1. String a,
  2. String b
)

Joins path segments with "/" and collapses duplicate separators.

Implementation

String uJoinPath(String a, String b) => a.endsWith("/") || a.endsWith(r"\") ? "$a$b" : "$a/$b";