urlFriendly property

string get urlFriendly

Returns a string ready for use in url paths.

Implementation

string get urlFriendly => replaceAll(" ", "-").toLowerCase().only([
      ...alphaChars,
      ...numberChars,
      "-",
      "_",
    ]);