ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
href.m
Go to the documentation of this file.
1%> \brief
2%> Return an HTML-style decoration of the input URL
3%> if the ParaMonte MATLAB library is used in GUI,
4%> otherwise, return the input URL as is.<br>
5%>
6%> \details
7%> This functionality is important for properly displaying
8%> hyperlinks within the MATLAB command-prompt while avoiding
9%> the unnecessary HTML syntax clutter where it is not recognized.<br>
10%>
11%> \param[in] url : The input scalar MATLAB string containing a bare url.<br>
12%>
13%> \return
14%> ``hlink`` : The output scalar MATLAB string containing the
15%> hyperlink (HTML-style-decorated) version of the input ``url``.<br>
16%>
17%> \interface{href}
18%> \code{.m}
19%>
20%> hlink = pm.web.href(url)
21%>
22%> \endcode
23%>
24%> \example{href}
25%> \include{lineno} example/web/href/main.m
26%> \output{href}
27%> \include{lineno} example/web/href/main.out.m
28%>
29%> \final{href}
30%>
31%> \author
32%> \JoshuaOsborne, May 22 2024, 7:49 PM, University of Texas at Arlington<br>
33%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
34%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
35function hlink = href(url)
36 persistent guiEnabled
37 if isempty(guiEnabled)
38 guiEnabled = pm.matlab.isgui();
39 end
40 if guiEnabled
41 hlink = "<a href=""" + url + """>" + url + "</a>";
42 else
43 hlink = url;
44 end
45end
function version(in silent)
Return a scalar MATLAB string containing the latest available ParaMonte MATLAB version newer than the...
function href(in url)
Return an HTML-style decoration of the input URL if the ParaMonte MATLAB library is used in GUI,...