</code></pre></div></div><p>Returns ASCII code for the first character in given string.</p><hr/><h3class="d-inline-block"id="get_string_pointer"><ahref="#get_string_pointer"class="anchor-heading"aria-labelledby="get_string_pointer"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_string_pointer</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_string_pointer</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">text</span><spanclass="p">)</span>
</code></pre></div></div><p>(DEPRECATED) Returns a pointer to a string variable or to a text</p><ul><li><strong>NOTE:</strong> this function is intended for use only in <codeclass="language-plaintext highlighter-rouge">HOOK_DESCRIPTIONOBJ</code>. Starting from sfall 4.4/3.8.40, you can return normal strings directly in the hook without calling the function</li></ul><hr/><h3class="d-inline-block"id="string_find"><ahref="#string_find"class="anchor-heading"aria-labelledby="string_find"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>string_find</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">string_find</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">haystack</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">needle</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns the position of the first occurrence of a <codeclass="language-plaintext highlighter-rouge">needle</code> string in a <codeclass="language-plaintext highlighter-rouge">haystack</code> string, or -1 if not found. The first character position is 0 (zero).</p><hr/><h3class="d-inline-block"id="string_find_from"><ahref="#string_find_from"class="anchor-heading"aria-labelledby="string_find_from"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>string_find_from</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">string_find_from</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">haystack</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">needle</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">pos</span><spanclass="p">)</span>
</code></pre></div></div><p>Works the same as <codeclass="language-plaintext highlighter-rouge">string_find</code>, except you can specify the position to start the search.</p><ul><li>If <codeclass="language-plaintext highlighter-rouge">pos</code> is negative - it indicates a position starting from the end of the string, similar to <codeclass="language-plaintext highlighter-rouge">substr()</code>.</li></ul><hr/><h3class="d-inline-block"id="string_format"><ahref="#string_format"class="anchor-heading"aria-labelledby="string_format"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>string_format</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">string</span><spanclass="n">string_format</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">format</span><spanclass="p">,</span><spanclass="n">any</span><spanclass="n">val1</span><spanclass="p">,</span><spanclass="n">any</span><spanclass="n">val2</span><spanclass="p">,</span><spanclass="p">...)</span>
</code></pre></div></div><p>Formats given values using standard syntax of C <codeclass="language-plaintext highlighter-rouge">printf</code> function (google “printf” for format details). However, it is limited to formatting up to 7 values.</p><ul><li>The format string is limited to 1024 characters</li></ul><hr/><h3class="d-inline-block"id="string_format_array"><ahref="#string_format_array"class="anchor-heading"aria-labelledby="string_format_array"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>string_format_array</strong></h3><pclass="label label-green">lib.strings.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">string</span><spanclass="n">string_format_array</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">format</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">array</span><spanclass="p">)</span>
</code></pre></div></div><p>The same as string_format, but accepts an array of parameters.</p><hr/><h3class="d-inline-block"id="string_replace"><ahref="#string_replace"class="anchor-heading"aria-labelledby="string_replace"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>string_replace</strong></h3><pclass="label label-green">lib.strings.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">string</span><spanclass="n">string_replace</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">str</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">search</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">replace</span><spanclass="p">)</span>
</code></pre></div></div><p>Replaces all occurances of a given search string in a string with a given replacement string.</p><hr/><h3id="string_split"><ahref="#string_split"class="anchor-heading"aria-labelledby="string_split"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>string_split</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">array</span><spanclass="n">string_split</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">text</span><spanclass="p">,</span><spanclass="n">split</span><spanclass="p">)</span>
</code></pre></div></div><p>Takes a string and a seperator, searches the string for all instances of the seperator, and returns a temp array filled with the pieces of the string split at each instance. If you give an empty string as the seperator, the string is split into individual characters. You can use this to search for a substring in a string like this: <codeclass="language-plaintext highlighter-rouge">strlen(get_array(string_split(haystack, needle), 0))</code></p><hr/><h3id="string_to_case"><ahref="#string_to_case"class="anchor-heading"aria-labelledby="string_to_case"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>string_to_case</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">string</span><spanclass="n">sfall_func2</span><spanclass="p">(</span><spanclass="s">"string_to_case"</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">text</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">toCase</span><spanclass="p">)</span>
</code></pre></div></div><p>Converts all letters in the given string to the specified case.</p><divclass="language-plaintext highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>toCase: 0 - lowercase, 1 - uppercase
</code></pre></div></div><p>NOTE: this function works only for English letters of A-Z/a-z.</p><hr/><h3id="strlen"><ahref="#strlen"class="anchor-heading"aria-labelledby="strlen"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>strlen</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">strlen</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">text</span><spanclass="p">)</span>
</code></pre></div></div><p>Cuts a substring from a string starting at “start” up to “length” characters. The first character position is 0 (zero).</p><ul><li>If start is negative - it indicates a position starting from the end of the string (for example <codeclass="language-plaintext highlighter-rouge">substr("test", -2, 2)</code> will return last 2 charactes: “st”).</li><li>If length is negative - it means so many characters will be omitted from the end of string (example: <codeclass="language-plaintext highlighter-rouge">substr("test", 0, -2)</code> will return string without last 2 characters: “te”).</li><li>If length is zero - it will return a string from the starting position to the end of the string. <strong>New behavior</strong> for sfall 4.2.2/3.8.22</li></ul></main><hr><footer><divclass="d-md-none mt-4 fs-2"> This site uses <ahref="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </div></footer></div></div><divclass="search-overlay"></div></div></body></html>