ocaml-containers/dev/containers/CCString/Find/index.html
2022-02-08 18:12:01 +00:00

2 lines
No EOL
3.4 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 xmlns="http://www.w3.org/1999/xhtml"><head><title>Find (containers.CCString.Find)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../index.html">containers</a> &#x00BB; <a href="../index.html">CCString</a> &#x00BB; Find</nav><header class="odoc-preamble"><h1>Module <code><span>CCString.Find</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type" id="type-pattern" class="anchored"><a href="#type-pattern" class="anchor"></a><code><span><span class="keyword">type</span> <span>_ pattern</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-compile" class="anchored"><a href="#val-compile" class="anchor"></a><code><span><span class="keyword">val</span> compile : <span>string <span class="arrow">&#45;&gt;</span></span> <span><span>[ `Direct ]</span> <a href="#type-pattern">pattern</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-rcompile" class="anchored"><a href="#val-rcompile" class="anchor"></a><code><span><span class="keyword">val</span> rcompile : <span>string <span class="arrow">&#45;&gt;</span></span> <span><span>[ `Reverse ]</span> <a href="#type-pattern">pattern</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-find" class="anchored"><a href="#val-find" class="anchor"></a><code><span><span class="keyword">val</span> find : <span>?start:int <span class="arrow">&#45;&gt;</span></span> <span>pattern:<span><span>[ `Direct ]</span> <a href="#type-pattern">pattern</a></span> <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p><code>find ~start ~pattern s</code> searches for <code>pattern</code> in the string <code>s</code>, left-to-right.</p><ul class="at-tags"><li class="returns"><span class="at-tag">returns</span> <p>the offset of the first match, -1 otherwise.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">start</span> <p>offset in string at which we start.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value" id="val-rfind" class="anchored"><a href="#val-rfind" class="anchor"></a><code><span><span class="keyword">val</span> rfind : <span>?start:int <span class="arrow">&#45;&gt;</span></span> <span>pattern:<span><span>[ `Reverse ]</span> <a href="#type-pattern">pattern</a></span> <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p><code>rfind ~start ~pattern s</code> searches for <code>pattern</code> in the string <code>s</code>, right-to-left.</p><ul class="at-tags"><li class="returns"><span class="at-tag">returns</span> <p>the offset of the start of the first match from the right, -1 otherwise.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">start</span> <p>right-offset in string at which we start.</p></li></ul></div></div></div></body></html>