join function

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

Adds a forward slash between the two paths.

NOTE: Do NOT use path.join, since package:build is expecting a forward slash regardless of the platform, but path.join will return a backslash on Windows.

Implementation

String join(String a, String b) => a.endsWith("/") ? "$a$b" : "$a/$b";