Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.2 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Справка Scilab >> Файлы: функции ввода/вывода > Пути - Имена файлов > splitURL

splitURL

Split an URL (HTTP, HTTPS, FTP...)

Calling Sequence

[proto, server, path, query, username, port, fragment] = splitURL(URL);

Arguments

URL

String: An URL. Supported and tested: HTTP, HTTPS, FTP (IPv4 and IPv6)

proto

String: the protocol (ex: http, ftp, etc)

server

String: the server (ex: www.scilab.org)

path

String: the path (ex: /products/scilab)

query

String: query (ex: ?SearchText=plot3d)

username

String: username (ex: username:pass)

port

int: port (ex: 80)

Note that if the port is not provided in the URL, the value will be 0.

fragment

String: fragment (ex: #chapter1)

The fragment is also called anchor and it is used to create a bookmark inside an HTML document.

Description

Split an URL by component

This function is based on the libxml2 library (in particular, the function xmlParseURI).

Examples

[proto, server, path, query, username, port, fragment] = splitURL("http://xmlsoft.org/html/libxml-uri.html#xmlParseURI")

[proto, server, path] = splitURL("ftp://ftp.free.fr/pub/Distributions_Linux/debian/README")

[a,b,c,d]=splitURL("http://www.scilab.org/content/search?SearchText=plot")

See Also

  • getURL — Download an URL (HTTP, HTTPS, FTP...)

History

ВерсияОписание
5.5.0 Function splitURL() introduced
Report an issue
<< tempname Пути - Имена файлов copyfile >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Apr 01 10:27:19 CEST 2015