<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>String_manipulation (baguette_sharp.Baguette_sharp.String_manipulation)</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">baguette_sharp</a> &#x00BB; <a href="../index.html">Baguette_sharp</a> &#x00BB; String_manipulation</nav><header class="odoc-preamble"><h1>Module <code><span>Baguette_sharp.String_manipulation</span></code></h1><p>The String Manipulation Module of the B# STD</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value" id="val-two_argument_func" class="anchored"><a href="#val-two_argument_func" class="anchor"></a><code><span><span class="keyword">val</span> two_argument_func : 
  <span><span>( <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a> )</span> <span class="arrow">&#45;&gt;</span></span>
  <span><span><span class="type-var">'a</span> list</span> <span class="arrow">&#45;&gt;</span></span>
  <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>A Generic function to extract two arguments and apply a function</p></div></div><div class="odoc-spec"><div class="spec value" id="val-three_argument_func" class="anchored"><a href="#val-three_argument_func" class="anchor"></a><code><span><span class="keyword">val</span> three_argument_func : 
  <span><span>( <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a> )</span> <span class="arrow">&#45;&gt;</span></span>
  <span><span><span class="type-var">'a</span> list</span> <span class="arrow">&#45;&gt;</span></span>
  <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>A Generic function to extract three arguments and apply a function</p></div></div><div class="odoc-spec"><div class="spec value" id="val-proto_create" class="anchored"><a href="#val-proto_create" class="anchor"></a><code><span><span class="keyword">val</span> proto_create : <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Takes an integer and a string and returns a string of n times the inputed one</p></div></div><div class="odoc-spec"><div class="spec value" id="val-proto_replace" class="anchored"><a href="#val-proto_replace" class="anchor"></a><code><span><span class="keyword">val</span> proto_replace : 
  <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span>
  <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span>
  <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span>
  <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Take three strings and returns a string where all occurence of s2 have been replaced by s3 in s1</p></div></div><div class="odoc-spec"><div class="spec value" id="val-explode" class="anchored"><a href="#val-explode" class="anchor"></a><code><span><span class="keyword">val</span> explode : <span>string <span class="arrow">&#45;&gt;</span></span> <span>string list</span></span></code></div><div class="spec-doc"><p>Transform a string into a list of character (but in the type String)</p></div></div><div class="odoc-spec"><div class="spec value" id="val-transform_to_array" class="anchored"><a href="#val-transform_to_array" class="anchor"></a><code><span><span class="keyword">val</span> transform_to_array : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Takes a string and transform it into an array of char with explode</p></div></div><div class="odoc-spec"><div class="spec value" id="val-extract_string_from_arg" class="anchored"><a href="#val-extract_string_from_arg" class="anchor"></a><code><span><span class="keyword">val</span> extract_string_from_arg : <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Extract the string from a parameter</p></div></div><div class="odoc-spec"><div class="spec value" id="val-transform_from_array" class="anchored"><a href="#val-transform_from_array" class="anchor"></a><code><span><span class="keyword">val</span> transform_from_array : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Transform an array into a string</p></div></div><div class="odoc-spec"><div class="spec value" id="val-proto_concat" class="anchored"><a href="#val-proto_concat" class="anchor"></a><code><span><span class="keyword">val</span> proto_concat : <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Takes two string and returns s1^s2</p></div></div><div class="odoc-spec"><div class="spec value" id="val-proto_access" class="anchored"><a href="#val-proto_access" class="anchor"></a><code><span><span class="keyword">val</span> proto_access : <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Takes an integer and a string and returns s.<code>n</code></p></div></div><div class="odoc-spec"><div class="spec value" id="val-proto_split" class="anchored"><a href="#val-proto_split" class="anchor"></a><code><span><span class="keyword">val</span> proto_split : <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Split s1 at every s2 occurences</p></div></div><p>Creates the function with the generic method and the proto one</p><div class="odoc-spec"><div class="spec value" id="val-replace" class="anchored"><a href="#val-replace" class="anchor"></a><code><span><span class="keyword">val</span> replace : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-concat" class="anchored"><a href="#val-concat" class="anchor"></a><code><span><span class="keyword">val</span> concat : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-create" class="anchored"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-access" class="anchored"><a href="#val-access" class="anchor"></a><code><span><span class="keyword">val</span> access : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-split" class="anchored"><a href="#val-split" class="anchor"></a><code><span><span class="keyword">val</span> split : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div></div><p>Conversion</p><div class="odoc-spec"><div class="spec value" id="val-convert_to_string" class="anchored"><a href="#val-convert_to_string" class="anchor"></a><code><span><span class="keyword">val</span> convert_to_string : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Converts an element to a string</p></div></div><div class="odoc-spec"><div class="spec value" id="val-int_from_string" class="anchored"><a href="#val-int_from_string" class="anchor"></a><code><span><span class="keyword">val</span> int_from_string : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Converts a string to an integer</p></div></div><div class="odoc-spec"><div class="spec value" id="val-double_from_string" class="anchored"><a href="#val-double_from_string" class="anchor"></a><code><span><span class="keyword">val</span> double_from_string : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Converts a string to a float</p></div></div><div class="odoc-spec"><div class="spec value" id="val-bool_from_string" class="anchored"><a href="#val-bool_from_string" class="anchor"></a><code><span><span class="keyword">val</span> bool_from_string : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Converts a string to a boolean</p></div></div></div></body></html>