ocaml-containers/2.4/containers/CCStringLabels/Sub/index.html
2018-12-23 21:02:45 -06:00

2 lines
No EOL
6.5 KiB
HTML
Raw Permalink 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 xmlns="http://www.w3.org/1999/xhtml"><head><title>Sub (containers.CCStringLabels.Sub)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">containers</a> &#x00BB; <a href="../index.html">CCStringLabels</a> &#x00BB; Sub</nav><h1>Module <code>CCStringLabels.Sub</code></h1></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type </span>t</code><code><span class="keyword"> = </span>string<span class="keyword"> * </span>int<span class="keyword"> * </span>int</code></dt><dd><p>A string, an offset, and the length of the slice.</p></dd></dl><dl><dt class="spec value" id="val-make"><a href="#val-make" class="anchor"></a><code><span class="keyword">val </span>make : string <span>&#45;&gt;</span> pos:int <span>&#45;&gt;</span> len:int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-full"><a href="#val-full" class="anchor"></a><code><span class="keyword">val </span>full : string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Full string.</p></dd></dl><dl><dt class="spec value" id="val-copy"><a href="#val-copy" class="anchor"></a><code><span class="keyword">val </span>copy : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Make a copy of the substring.</p></dd></dl><dl><dt class="spec value" id="val-underlying"><a href="#val-underlying" class="anchor"></a><code><span class="keyword">val </span>underlying : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dt class="spec value" id="val-sub"><a href="#val-sub" class="anchor"></a><code><span class="keyword">val </span>sub : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Sub-slice.</p></dd></dl><dl><dt class="spec value" id="val-get"><a href="#val-get" class="anchor"></a><code><span class="keyword">val </span>get : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> char</code></dt><dd><p><code>get s i</code> gets the <code>i</code>-th element, or fails.</p><dl><dt>raises Invalid_argument</dt><dd><p>if the index is not within <code>0 ... length - 1</code>.</p></dd></dl><dl><dt>since</dt><dd>1.2</dd></dl></dd></dl><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include </span><a href="../index.html#module-type-S">S</a><span class="keyword"> with </span><span class="keyword">type </span><a href="../module-type-S/index.html#type-t">t</a> := <a href="index.html#type-t">t</a></code></span></summary><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type </span>t</code></dt></dl><dl><dt class="spec value" id="val-length"><a href="#val-length" class="anchor"></a><code><span class="keyword">val </span>length : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Return the length (number of characters) of the given string.</p></dd></dl><dl><dt class="spec value" id="val-blit"><a href="#val-blit" class="anchor"></a><code><span class="keyword">val </span>blit : src:<a href="index.html#type-t">t</a> <span>&#45;&gt;</span> src_pos:int <span>&#45;&gt;</span> dst:Bytes.t <span>&#45;&gt;</span> dst_pos:int <span>&#45;&gt;</span> len:int <span>&#45;&gt;</span> unit</code></dt><dd><p>Like <span class="xref-unresolved" title="unresolved reference to &quot;String.blit&quot;"><code>String</code>.blit</span>. Compatible with the <code>-safe-string</code> option.</p><dl><dt>raises Invalid_argument</dt><dd><p>if indices are not valid.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-fold"><a href="#val-fold" class="anchor"></a><code><span class="keyword">val </span>fold : f:(<span class="type-var">'a</span> <span>&#45;&gt;</span> char <span>&#45;&gt;</span> <span class="type-var">'a</span>) <span>&#45;&gt;</span> init:<span class="type-var">'a</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Fold on chars by increasing index.</p><dl><dt>since</dt><dd>0.7</dd></dl></dd></dl><section><header><h2 id="conversions"><a href="#conversions" class="anchor"></a>Conversions</h2></header><dl><dt class="spec value" id="val-to_gen"><a href="#val-to_gen" class="anchor"></a><code><span class="keyword">val </span>to_gen : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> char <a href="../index.html#type-gen">gen</a></code></dt><dd><p>Return the <code>gen</code> of characters contained in the string.</p></dd></dl><dl><dt class="spec value" id="val-to_seq"><a href="#val-to_seq" class="anchor"></a><code><span class="keyword">val </span>to_seq : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> char <a href="../index.html#type-sequence">sequence</a></code></dt><dd><p>Return the <code>sequence</code> of characters contained in the string.</p></dd></dl><dl><dt class="spec value" id="val-to_klist"><a href="#val-to_klist" class="anchor"></a><code><span class="keyword">val </span>to_klist : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> char <a href="../index.html#type-klist">klist</a></code></dt><dd><p>Return the <code>klist</code> of characters contained in the string.</p></dd></dl><dl><dt class="spec value" id="val-to_list"><a href="#val-to_list" class="anchor"></a><code><span class="keyword">val </span>to_list : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> char list</code></dt><dd><p>Return the list of characters contained in the string.</p></dd></dl><dl><dt class="spec value" id="val-pp_buf"><a href="#val-pp_buf" class="anchor"></a><code><span class="keyword">val </span>pp_buf : Buffer.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Renamed from <code>pp</code> since 2.0.</p></dd></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val </span>pp : Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Print the string within quotes.</p><p>Renamed from <code>print</code> since 2.0.</p></dd></dl></section></details></div></div></div></div></body></html>