oxipng/doc/clap/struct.ArgMatches.html
2016-04-20 15:59:23 -04:00

455 lines
No EOL
47 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `ArgMatches` struct in crate `clap`.">
<meta name="keywords" content="rust, rustlang, rust-lang, ArgMatches">
<title>clap::ArgMatches - Rust</title>
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../main.css">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'><a href='index.html'>clap</a></p><script>window.sidebarCurrent = {name: 'ArgMatches', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>clap</a>::<wbr><a class='struct' href=''>ArgMatches</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a id='src-3495' class='srclink' href='../src/clap/args/arg_matches.rs.html#60-67' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct ArgMatches&lt;'a&gt; {
// some fields omitted
}</pre><div class='docblock'><p>Used to get information about the arguments that where supplied to the program at runtime by
the user. New instances of this struct are obtained by using the <code>App::get_matches</code> family of
methods.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>matches</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;MyApp&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;out&quot;</span>)
.<span class='ident'>long</span>(<span class='string'>&quot;output&quot;</span>)
.<span class='ident'>required</span>(<span class='boolval'>true</span>)
.<span class='ident'>takes_value</span>(<span class='boolval'>true</span>))
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;debug&quot;</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;d&quot;</span>)
.<span class='ident'>multiple</span>(<span class='boolval'>true</span>))
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;cfg&quot;</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;c&quot;</span>)
.<span class='ident'>takes_value</span>(<span class='boolval'>true</span>))
.<span class='ident'>get_matches</span>(); <span class='comment'>// builds the instance of ArgMatches</span>
<span class='comment'>// to get information about the &quot;cfg&quot; argument we created, such as the value supplied we use</span>
<span class='comment'>// various ArgMatches methods, such as ArgMatches::value_of</span>
<span class='kw'>if</span> <span class='kw'>let</span> <span class='prelude-val'>Some</span>(<span class='ident'>c</span>) <span class='op'>=</span> <span class='ident'>matches</span>.<span class='ident'>value_of</span>(<span class='string'>&quot;cfg&quot;</span>) {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Value for -c: {}&quot;</span>, <span class='ident'>c</span>);
}
<span class='comment'>// The ArgMatches::value_of method returns an Option because the user may not have supplied</span>
<span class='comment'>// that argument at runtime. But if we specified that the argument was &quot;required&quot; as we did</span>
<span class='comment'>// with the &quot;out&quot; argument, we can safely unwrap because `clap` verifies that was actually</span>
<span class='comment'>// used at runtime.</span>
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Value for --output: {}&quot;</span>, <span class='ident'>matches</span>.<span class='ident'>value_of</span>(<span class='string'>&quot;out&quot;</span>).<span class='ident'>unwrap</span>());
<span class='comment'>// You can check the presence of an argument</span>
<span class='kw'>if</span> <span class='ident'>matches</span>.<span class='ident'>is_present</span>(<span class='string'>&quot;out&quot;</span>) {
<span class='comment'>// Another way to check if an argument was present, or if it occurred multiple times is to</span>
<span class='comment'>// use occurrences_of() which returns 0 if an argument isn&#39;t found at runtime, or the</span>
<span class='comment'>// number of times that it occurred, if it was. To allow an argument to appear more than</span>
<span class='comment'>// once, you must use the .multiple(true) method, otherwise it will only return 1 or 0.</span>
<span class='kw'>if</span> <span class='ident'>matches</span>.<span class='ident'>occurrences_of</span>(<span class='string'>&quot;debug&quot;</span>) <span class='op'>&gt;</span> <span class='number'>2</span> {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Debug mode is REALLY on, don&#39;t be crazy&quot;</span>);
} <span class='kw'>else</span> {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Debug mode kind of on&quot;</span>);
}
}</pre>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl&lt;'a&gt; <a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>&lt;'a&gt;</code></h3><div class='impl-items'><h4 id='method.value_of' class='method'><code>fn <a href='#method.value_of' class='fnname'>value_of</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;self, name: S) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;</code></h4>
<div class='docblock'><p>Gets the value of a specific option or positional argument (i.e. an argument that takes
an additional value at runtime). If the option wasn&#39;t present at runtime
it returns <code>None</code>.</p>
<p><em>NOTE:</em> If getting a value for an option or positional argument that allows multiples,
prefer <code>values_of()</code> as <code>value_of()</code> will only return the <em>first</em> value.</p>
<h1 id='panics' class='section-header'><a href='#panics'>Panics</a></h1>
<p>This method will <code>panic!</code> if the value contains invalid UTF-8 code points.</p>
<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myapp&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;output&quot;</span>)
.<span class='ident'>takes_value</span>(<span class='boolval'>true</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;myapp&quot;</span>, <span class='string'>&quot;something&quot;</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>m</span>.<span class='ident'>value_of</span>(<span class='string'>&quot;output&quot;</span>), <span class='prelude-val'>Some</span>(<span class='string'>&quot;something&quot;</span>));</pre>
</div><h4 id='method.value_of_lossy' class='method'><code>fn <a href='#method.value_of_lossy' class='fnname'>value_of_lossy</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;'a self, name: S) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a>&lt;'a, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;</code></h4>
<div class='docblock'><p>Gets the lossy value of a specific argument. If the argument wasn&#39;t present at runtime
it returns <code>None</code>. A lossy value is one which contains invalid UTF-8 code points, those
invalid points will be replaced with <code>\u{FFFD}</code></p>
<p><em>NOTE:</em> If getting a value for an option or positional argument that allows multiples,
prefer <code>values_of_lossy()</code> as <code>value_of_lossy()</code> will only return the <em>first</em> value.</p>
<h1 id='examples-2' class='section-header'><a href='#examples-2'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ffi</span>::<span class='ident'>OsString</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>os</span>::<span class='ident'>unix</span>::<span class='ident'>ffi</span>::<span class='ident'>OsStrExt</span>;
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;utf8&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>from_usage</span>(<span class='string'>&quot;&lt;arg&gt; &#39;some arg&#39;&quot;</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>OsString</span>::<span class='ident'>from</span>(<span class='string'>&quot;myprog&quot;</span>),
<span class='comment'>// &quot;Hi {0xe9}!&quot;</span>
<span class='ident'>OsString</span>::<span class='ident'>from_vec</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>b&#39;H&#39;</span>, <span class='string'>b&#39;i&#39;</span>, <span class='string'>b&#39; &#39;</span>, <span class='number'>0xe9</span>, <span class='string'>b&#39;!&#39;</span>])]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='op'>*</span><span class='ident'>m</span>.<span class='ident'>value_of_lossy</span>(<span class='string'>&quot;arg&quot;</span>).<span class='ident'>unwrap</span>(), <span class='string'>&quot;Hi \u{FFFD}!&quot;</span>);</pre>
</div><h4 id='method.value_of_os' class='method'><code>fn <a href='#method.value_of_os' class='fnname'>value_of_os</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;self, name: S) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='struct' href='https://doc.rust-lang.org/nightly/std/ffi/os_str/struct.OsStr.html' title='std::ffi::os_str::OsStr'>OsStr</a>&gt;</code></h4>
<div class='docblock'><p>Gets the OS version of a string value of a specific argument. If the option wasn&#39;t present
at runtime it returns <code>None</code>. An OS value on Unix-like systems is any series of bytes,
regardless of whether or not they contain valid UTF-8 code points. Since <code>String</code>s in Rust
are guaranteed to be valid UTF-8, a valid filename on a Unix system as an argument value may
contain invalid UTF-8 code points.</p>
<p><em>NOTE:</em> If getting a value for an option or positional argument that allows multiples,
prefer <code>values_of_os()</code> as <code>value_of_os()</code> will only return the <em>first</em> value.</p>
<h1 id='examples-3' class='section-header'><a href='#examples-3'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ffi</span>::<span class='ident'>OsString</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>os</span>::<span class='ident'>unix</span>::<span class='ident'>ffi</span>::<span class='ident'>OsStrExt</span>;
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;utf8&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>from_usage</span>(<span class='string'>&quot;&lt;arg&gt; &#39;some arg&#39;&quot;</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>OsString</span>::<span class='ident'>from</span>(<span class='string'>&quot;myprog&quot;</span>),
<span class='comment'>// &quot;Hi {0xe9}!&quot;</span>
<span class='ident'>OsString</span>::<span class='ident'>from_vec</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>b&#39;H&#39;</span>, <span class='string'>b&#39;i&#39;</span>, <span class='string'>b&#39; &#39;</span>, <span class='number'>0xe9</span>, <span class='string'>b&#39;!&#39;</span>])]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='op'>*</span><span class='ident'>m</span>.<span class='ident'>value_of_os</span>(<span class='string'>&quot;arg&quot;</span>).<span class='ident'>unwrap</span>().<span class='ident'>as_bytes</span>(), [<span class='string'>b&#39;H&#39;</span>, <span class='string'>b&#39;i&#39;</span>, <span class='string'>b&#39; &#39;</span>, <span class='number'>0xe9</span>, <span class='string'>b&#39;!&#39;</span>]);</pre>
</div><h4 id='method.values_of' class='method'><code>fn <a href='#method.values_of' class='fnname'>values_of</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;'a self, name: S) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Values&lt;'a&gt;&gt;</code></h4>
<div class='docblock'><p>Gets an Iterator of values of a specific argument (i.e. an argument that takes multiple
values at runtime). If the option wasn&#39;t present at runtime it returns <code>None</code></p>
<h1 id='panics-1' class='section-header'><a href='#panics-1'>Panics</a></h1>
<p>This method will panic if any of the values contain invalid UTF-8 code points.</p>
<h1 id='examples-4' class='section-header'><a href='#examples-4'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myprog&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;output&quot;</span>)
.<span class='ident'>multiple</span>(<span class='boolval'>true</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;o&quot;</span>)
.<span class='ident'>takes_value</span>(<span class='boolval'>true</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
<span class='string'>&quot;myprog&quot;</span>, <span class='string'>&quot;-o&quot;</span>, <span class='string'>&quot;val1&quot;</span>, <span class='string'>&quot;val2&quot;</span>, <span class='string'>&quot;val3&quot;</span>
]);
<span class='kw'>let</span> <span class='ident'>vals</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>m</span>.<span class='ident'>values_of</span>(<span class='string'>&quot;output&quot;</span>).<span class='ident'>unwrap</span>().<span class='ident'>collect</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vals</span>, [<span class='string'>&quot;val1&quot;</span>, <span class='string'>&quot;val2&quot;</span>, <span class='string'>&quot;val3&quot;</span>]);</pre>
</div><h4 id='method.values_of_lossy' class='method'><code>fn <a href='#method.values_of_lossy' class='fnname'>values_of_lossy</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;'a self, name: S) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;&gt;</code></h4>
<div class='docblock'><p>Gets the lossy values of a specific argument If the option wasn&#39;t present at runtime
it returns <code>None</code>. A lossy value is one which contains invalid UTF-8 code points, those
invalid points will be replaced with <code>\u{FFFD}</code></p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ffi</span>::<span class='ident'>OsString</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>os</span>::<span class='ident'>unix</span>::<span class='ident'>ffi</span>::<span class='ident'>OsStrExt</span>;
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;utf8&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>from_usage</span>(<span class='string'>&quot;&lt;arg&gt; &#39;some arg&#39;&quot;</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>OsString</span>::<span class='ident'>from</span>(<span class='string'>&quot;myprog&quot;</span>),
<span class='comment'>// &quot;Hi {0xe9}!&quot;</span>
<span class='ident'>OsString</span>::<span class='ident'>from_vec</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>b&#39;H&#39;</span>, <span class='string'>b&#39;i&#39;</span>, <span class='string'>b&#39; &#39;</span>, <span class='number'>0xe9</span>, <span class='string'>b&#39;!&#39;</span>])]);
<span class='kw'>let</span> <span class='ident'>itr</span> <span class='op'>=</span> <span class='ident'>m</span>.<span class='ident'>values_of_lossy</span>(<span class='string'>&quot;arg&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='op'>*</span><span class='ident'>itr</span>.<span class='ident'>next</span>().<span class='ident'>unwrap</span>(), <span class='string'>&quot;Hi&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='op'>*</span><span class='ident'>itr</span>.<span class='ident'>next</span>().<span class='ident'>unwrap</span>(), <span class='string'>&quot;\u{FFFD}!&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>itr</span>.<span class='ident'>next</span>(), <span class='prelude-val'>None</span>);</pre>
</div><h4 id='method.values_of_os' class='method'><code>fn <a href='#method.values_of_os' class='fnname'>values_of_os</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;'a self, name: S) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;OsValues&lt;'a&gt;&gt;</code></h4>
<div class='docblock'><p>Gets the OS version of a string value of a specific argument If the option wasn&#39;t present
at runtime it returns <code>None</code>. An OS value on Unix-like systems is any series of bytes,
regardless of whether or not they contain valid UTF-8 code points. Since <code>String</code>s in Rust
are guaranteed to be valid UTF-8, a valid filename as an argument value on Linux (for
example) may contain invalid UTF-8 code points.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ffi</span>::<span class='ident'>OsString</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>os</span>::<span class='ident'>unix</span>::<span class='ident'>ffi</span>::<span class='ident'>OsStrExt</span>;
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;utf8&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>from_usage</span>(<span class='string'>&quot;&lt;arg&gt; &#39;some arg&#39;&quot;</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>OsString</span>::<span class='ident'>from</span>(<span class='string'>&quot;myprog&quot;</span>),
<span class='comment'>// &quot;Hi&quot;</span>
<span class='ident'>OsString</span>::<span class='ident'>from_vec</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>b&#39;H&#39;</span>, <span class='string'>b&#39;i&#39;</span>]),
<span class='comment'>// &quot;{0xe9}!&quot;</span>
<span class='ident'>OsString</span>::<span class='ident'>from_vec</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0xe9</span>, <span class='string'>b&#39;!&#39;</span>])]);
<span class='kw'>let</span> <span class='ident'>itr</span> <span class='op'>=</span> <span class='ident'>m</span>.<span class='ident'>values_of_os</span>(<span class='string'>&quot;arg&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>itr</span>.<span class='ident'>next</span>(), <span class='prelude-val'>Some</span>(<span class='kw-2'>&amp;</span><span class='op'>*</span><span class='ident'>OsString</span>::<span class='ident'>from</span>(<span class='string'>&quot;Hi&quot;</span>)));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>itr</span>.<span class='ident'>next</span>(), <span class='prelude-val'>Some</span>(<span class='kw-2'>&amp;</span><span class='op'>*</span><span class='ident'>OsString</span>::<span class='ident'>from_vec</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0xe9</span>, <span class='string'>b&#39;!&#39;</span>])));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>itr</span>.<span class='ident'>next</span>(), <span class='prelude-val'>None</span>);</pre>
</div><h4 id='method.is_present' class='method'><code>fn <a href='#method.is_present' class='fnname'>is_present</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;self, name: S) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns <code>true</code> if an argument was present at runtime, otherwise <code>false</code>.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myprog&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;debug&quot;</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;d&quot;</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
<span class='string'>&quot;myprog&quot;</span>, <span class='string'>&quot;-d&quot;</span>
]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>m</span>.<span class='ident'>is_present</span>(<span class='string'>&quot;debug&quot;</span>));</pre>
</div><h4 id='method.occurrences_of' class='method'><code>fn <a href='#method.occurrences_of' class='fnname'>occurrences_of</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;self, name: S) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h4>
<div class='docblock'><p>Returns the number of times an argument was used at runtime. If an argument isn&#39;t present
it will return <code>0</code>.</p>
<p><strong>NOTE:</strong> This returns the number of times the argument was used, <em>not</em> the number of
values. For example, <code>-o val1 val2 val3 -o val4</code> would return <code>2</code>.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myprog&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;debug&quot;</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;d&quot;</span>)
.<span class='ident'>multiple</span>(<span class='boolval'>true</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
<span class='string'>&quot;myprog&quot;</span>, <span class='string'>&quot;-d&quot;</span>, <span class='string'>&quot;-d&quot;</span>, <span class='string'>&quot;-d&quot;</span>
]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>m</span>.<span class='ident'>occurrences_of</span>(<span class='string'>&quot;debug&quot;</span>), <span class='number'>3</span>);</pre>
<p>This next example shows that counts actual uses of the argument, not just <code>-</code>&#39;s</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myprog&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;debug&quot;</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;d&quot;</span>)
.<span class='ident'>multiple</span>(<span class='boolval'>true</span>))
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;flag&quot;</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;f&quot;</span>))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
<span class='string'>&quot;myprog&quot;</span>, <span class='string'>&quot;-ddfd&quot;</span>
]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>m</span>.<span class='ident'>occurrences_of</span>(<span class='string'>&quot;debug&quot;</span>), <span class='number'>3</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>m</span>.<span class='ident'>occurrences_of</span>(<span class='string'>&quot;flag&quot;</span>), <span class='number'>1</span>);</pre>
</div><h4 id='method.subcommand_matches' class='method'><code>fn <a href='#method.subcommand_matches' class='fnname'>subcommand_matches</a>&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;(&amp;self, name: S) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>&lt;'a&gt;&gt;</code></h4>
<div class='docblock'><p>Because subcommands are essentially &quot;sub-apps&quot; they have their own <code>ArgMatches</code> as well.
This method returns the <code>ArgMatches</code> for a particular subcommand or None if the subcommand
wasn&#39;t present at runtime.</p>
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>app_m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myprog&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;debug&quot;</span>)
.<span class='ident'>short</span>(<span class='string'>&quot;d&quot;</span>))
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;test&quot;</span>)
.<span class='ident'>arg</span>(<span class='ident'>Arg</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;opt&quot;</span>)
.<span class='ident'>long</span>(<span class='string'>&quot;option&quot;</span>)
.<span class='ident'>takes_value</span>(<span class='boolval'>true</span>)))
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
<span class='string'>&quot;myprog&quot;</span>, <span class='string'>&quot;-d&quot;</span>, <span class='string'>&quot;test&quot;</span>, <span class='string'>&quot;--option&quot;</span>, <span class='string'>&quot;val&quot;</span>
]);
<span class='comment'>// Both parent commands, and child subcommands can have arguments present at the same times</span>
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>app_m</span>.<span class='ident'>is_present</span>(<span class='string'>&quot;debug&quot;</span>));
<span class='comment'>// Get the subcommand&#39;s ArgMatches instance</span>
<span class='kw'>if</span> <span class='kw'>let</span> <span class='prelude-val'>Some</span>(<span class='ident'>sub_m</span>) <span class='op'>=</span> <span class='ident'>app_m</span>.<span class='ident'>subcommand_matches</span>(<span class='string'>&quot;test&quot;</span>) {
<span class='comment'>// Use the struct like normal</span>
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>sub_m</span>.<span class='ident'>value_of</span>(<span class='string'>&quot;opt&quot;</span>), <span class='prelude-val'>Some</span>(<span class='string'>&quot;val&quot;</span>));
}</pre>
</div><h4 id='method.subcommand_name' class='method'><code>fn <a href='#method.subcommand_name' class='fnname'>subcommand_name</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;</code></h4>
<div class='docblock'><p>Because subcommands are essentially &quot;sub-apps&quot; they have their own <code>ArgMatches</code> as well.
But simply getting the sub-<code>ArgMatches</code> doesn&#39;t help much if we don&#39;t also know which
subcommand was actually used. This method returns the name of the subcommand that was used
at runtime, or <code>None</code> if one wasn&#39;t.</p>
<p><em>NOTE</em>: Subcommands form a hierarchy, where multiple subcommands can be used at runtime,
but only a single subcommand from any group of sibling commands may used at once.</p>
<p>An ASCII art depiction may help explain this better...Using a fictional version of <code>git</code> as
the demo subject. Imagine the following are all subcommands of <code>git</code> (note, the author is
aware these aren&#39;t actually all subcommands in the real <code>git</code> interface, but it makes
explaination easier)</p>
<pre><code class="language-notrust"> Top Level App (git) TOP
|
-----------------------------------------
/ | \ \
clone push add commit LEVEL 1
| / \ / \ |
url origin remote ref name message LEVEL 2
/ /\
path remote local LEVEL 3
</code></pre>
<p>Given the above fictional subcommand hierarchy, valid runtime uses would be (not an all
inclusive list, and not including argument options per command for brevity and clarity):</p>
<pre class='rust rust-example-rendered'>
$ <span class='ident'>git</span> <span class='ident'>clone</span> <span class='ident'>url</span>
$ <span class='ident'>git</span> <span class='ident'>push</span> <span class='ident'>origin</span> <span class='ident'>path</span>
$ <span class='ident'>git</span> <span class='ident'>add</span> <span class='kw-2'>ref</span> <span class='ident'>local</span>
$ <span class='ident'>git</span> <span class='ident'>commit</span> <span class='ident'>message</span></pre>
<p>Notice only one command per &quot;level&quot; may be used. You could not, for example, do <code>$ git clone url push origin path</code></p>
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>app_m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;git&quot;</span>)
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;clone&quot;</span>))
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;push&quot;</span>))
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;commit&quot;</span>))
.<span class='ident'>get_matches</span>();
<span class='kw'>match</span> <span class='ident'>app_m</span>.<span class='ident'>subcommand_name</span>() {
<span class='prelude-val'>Some</span>(<span class='string'>&quot;clone&quot;</span>) <span class='op'>=&gt;</span> {}, <span class='comment'>// clone was used</span>
<span class='prelude-val'>Some</span>(<span class='string'>&quot;push&quot;</span>) <span class='op'>=&gt;</span> {}, <span class='comment'>// push was used</span>
<span class='prelude-val'>Some</span>(<span class='string'>&quot;commit&quot;</span>) <span class='op'>=&gt;</span> {}, <span class='comment'>// commit was used</span>
_ <span class='op'>=&gt;</span> {}, <span class='comment'>// Either no subcommand or one not tested for...</span>
}</pre>
</div><h4 id='method.subcommand' class='method'><code>fn <a href='#method.subcommand' class='fnname'>subcommand</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>&amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>&lt;'a&gt;&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<div class='docblock'><p>This brings together <code>ArgMatches::subcommand_matches</code> and <code>ArgMatches::subcommand_name</code> by
returning a tuple with both pieces of information.</p>
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>app_m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;git&quot;</span>)
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;clone&quot;</span>))
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;push&quot;</span>))
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;commit&quot;</span>))
.<span class='ident'>get_matches</span>();
<span class='kw'>match</span> <span class='ident'>app_m</span>.<span class='ident'>subcommand</span>() {
(<span class='string'>&quot;clone&quot;</span>, <span class='prelude-val'>Some</span>(<span class='ident'>sub_m</span>)) <span class='op'>=&gt;</span> {}, <span class='comment'>// clone was used</span>
(<span class='string'>&quot;push&quot;</span>, <span class='prelude-val'>Some</span>(<span class='ident'>sub_m</span>)) <span class='op'>=&gt;</span> {}, <span class='comment'>// push was used</span>
(<span class='string'>&quot;commit&quot;</span>, <span class='prelude-val'>Some</span>(<span class='ident'>sub_m</span>)) <span class='op'>=&gt;</span> {}, <span class='comment'>// commit was used</span>
_ <span class='op'>=&gt;</span> {}, <span class='comment'>// Either no subcommand or one not tested for...</span>
}</pre>
<p>Another useful scenario is when you want to support third party, or external, subcommands.
In these cases you can&#39;t know the subcommand name ahead of time, so use a variable instead
with pattern matching!</p>
<pre class='rust rust-example-rendered'>
<span class='comment'>// Assume there is an external subcommand named &quot;subcmd&quot;</span>
<span class='kw'>let</span> <span class='ident'>app_m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myprog&quot;</span>)
.<span class='ident'>setting</span>(<span class='ident'>AppSettings</span>::<span class='ident'>AllowExternalSubcommands</span>)
.<span class='ident'>get_matches_from</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
<span class='string'>&quot;myprog&quot;</span>, <span class='string'>&quot;subcmd&quot;</span>, <span class='string'>&quot;--option&quot;</span>, <span class='string'>&quot;value&quot;</span>, <span class='string'>&quot;-fff&quot;</span>, <span class='string'>&quot;--flag&quot;</span>
]);
<span class='comment'>// All trailing arguments will be stored under the subcommand&#39;s sub-matches using a value</span>
<span class='comment'>// of the runtime subcommand name (in this case &quot;subcmd&quot;)</span>
<span class='kw'>match</span> <span class='ident'>app_m</span>.<span class='ident'>subcommand</span>() {
(<span class='ident'>external</span>, <span class='prelude-val'>Some</span>(<span class='ident'>sub_m</span>)) <span class='op'>=&gt;</span> {
<span class='kw'>let</span> <span class='ident'>ext_args</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>sub_m</span>.<span class='ident'>values_of</span>(<span class='ident'>external</span>).<span class='ident'>unwrap</span>().<span class='ident'>collect</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>ext_args</span>, [<span class='string'>&quot;--option&quot;</span>, <span class='string'>&quot;value&quot;</span>, <span class='string'>&quot;-fff&quot;</span>, <span class='string'>&quot;--flag&quot;</span>]);
},
_ <span class='op'>=&gt;</span> {},
}</pre>
</div><h4 id='method.usage' class='method'><code>fn <a href='#method.usage' class='fnname'>usage</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<div class='docblock'><p>Returns a string slice of the usage statement for the <code>App</code> (or <code>SubCommand</code>)</p>
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>app_m</span> <span class='op'>=</span> <span class='ident'>App</span>::<span class='ident'>new</span>(<span class='string'>&quot;myprog&quot;</span>)
.<span class='ident'>subcommand</span>(<span class='ident'>SubCommand</span>::<span class='ident'>with_name</span>(<span class='string'>&quot;test&quot;</span>))
.<span class='ident'>get_matches</span>();
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>app_m</span>.<span class='ident'>usage</span>());</pre>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>&lt;'a&gt;</code></h3><div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; Self</code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>&lt;'a&gt;</code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>&lt;'a&gt;</code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</div><h3 class='impl'><code>impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../clap/struct.ArgMatches.html' title='clap::ArgMatches'>ArgMatches</a>&lt;'a&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "clap";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>