urlJoin
Merges the given string argument with the first argument (the beginning of the URL), joining it so that the slash (/) symbol is correctly included.
The segments are passed as a single list rather than as separate arguments.
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
args | ...any[]List<String?>*Any | ● | – |
| URL segments to join, as separate arguments.URL segments to join, as a single list. | |||
Returns
string
String
str
Examples
javascript
urlJoin('https://example.com', 'hello', 'world'); // Returns 'https://example.com/hello/world'dart
urlJoin(['https://example.com', 'hello', 'world']); // Returns 'https://example.com/hello/world'python
urlJoin('https://example.com', 'hello', 'world') # Returns 'https://example.com/hello/world'