본문으로 건너뛰기

urlJoin

주어진 문자열 인수를 첫 번째 인수(URL의 시작)와 합쳐서 슬래시(/) 기호가 올바르게 포함되도록 연결합니다.

조각들은 각각의 인자가 아니라 List 하나로 전달합니다.

Parameters

이름타입필수기본값
args...any[]List<String?>*Any
연결할 URL 조각들입니다. 각각의 인자로 전달합니다.연결할 URL 조각들입니다. 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'

Released under the MIT License