ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
basename.m
Go to the documentation of this file.
1%> \brief
2%> Return a scalar MATLAB string containing
3%> the basename part of an input ``url``, defined as
4%> the segment of the ``url`` after the last separator ``/``.<br>
5%>
6%> \param[in] url : The input scalar MATLAB string containing a bare URL.<br>
7%>
8%> \return
9%> ``name`` : The output scalar MATLAB string containing
10%> the basename part of an input ``url``, defined as
11%> the segment of the ``url`` after the last separator ``/``.<br>
12%> If the input ``url`` ends with ``/``, then the output
13%> basename is set to the default ``index.html``.<br>
14%>
15%>
16%> \interface{basename}
17%> \code{.m}
18%>
19%> name = pm.web.basename(url)
20%>
21%> \endcode
22%>
23%> \example{basename}
24%> \include{lineno} example/web/basename/main.m
25%> \output{basename}
26%> \include{lineno} example/web/basename/main.out.m
27%>
28%> \final{basename}
29%>
30%> \author
31%> \JoshuaOsborne, May 22 2024, 7:47 PM, University of Texas at Arlington<br>
32%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
33%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
34function name = basename(url)
35 name = strsplit(url, '/');
36 name = name(end);
37end
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function index(in array)
Given array(1 : n), return the array index indx(1 : n) such that array(indx) is in ascending order.
function basename(in url)
Return a scalar MATLAB string containing the basename part of an input url, defined as the segment of...