Files
source/S/lib--strutil.h.html
github-actions[bot] 08571174ab Deploy to GitHub Pages
2026-02-01 17:32:02 +00:00

727 lines
119 KiB
HTML

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/strutil.h</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.6.11' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#L217'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#L672'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/lib.html'>lib</a>/strutil.h</span></li>
</ul></div>
<!-- end of fixed guide -->
<div align='right'>Manual pages:
<a href=man/mc.html>mc</a> &bullet; <a href=man/mcdiff.html>mcdiff</a> &bullet; <a href=man/mcedit.html>mcedit</a> &bullet; <a href=man/mcview.html>mcview</a>
</div>
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/lib.html'>lib</a>/strutil.h</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><a href='#L217'><img class='icon' src='../icons/first.png' alt='[first]' /></a><a href='#L672'><img class='icon' src='../icons/last.png' alt='[last]' /></a><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 lib/strutil.h' /> */</em>
<hr />
<h2 class='header'><a href='../J/strutil.h.html' title='Multiple included from 128 places.'>INCLUDED FROM</a></h2>
<hr />
<h2 class='header'>DEFINITIONS</h2>
This source file includes following definitions.
<ol>
<li><a href='#L217' title='Defined at 217.'>str_printf</a></li>
<li><a href='#L616' title='Defined at 616.'>str_move</a></li>
<li><a href='#L672' title='Defined at 672.'>filevercmp</a></li>
</ol>
<hr />
<pre>
<a id='L1' name='L1'></a> 1 <em class='sharp'>#ifndef</em> <a href='../S/lib--strutil.h.html#L2' title='Defined at 2 in lib/strutil.h.'>MC_STRUTIL_H</a>
<a id='L2' name='L2'></a> 2 <em class='sharp'>#define</em> <a href='../S/lib--strutil.h.html#L1' title='Referred from 1 in lib/strutil.h.'>MC_STRUTIL_H</a>
<a id='L3' name='L3'></a> 3
<a id='L4' name='L4'></a> 4 <em class='sharp'>#include</em> "<a href='lib--global.h.html'>lib/global.h</a>" <em class='comment'>// include glib.h</em>
<a id='L5' name='L5'></a> 5
<a id='L6' name='L6'></a> 6 <em class='sharp'>#include</em> &lt;sys/types.h&gt;
<a id='L7' name='L7'></a> 7 <em class='sharp'>#include</em> &lt;inttypes.h&gt;
<a id='L8' name='L8'></a> 8 <em class='sharp'>#include</em> &lt;string.h&gt;
<a id='L9' name='L9'></a> 9
<a id='L10' name='L10'></a> 10 <em class='comment'>/* Header file for strutil.c, strutilascii.c, strutil8bit.c, strutilutf8.c.</em>
<a id='L11' name='L11'></a> 11 <em class='comment'> * There are two sort of functions:</em>
<a id='L12' name='L12'></a> 12 <em class='comment'> * 1. functions for working with growing strings and conversion strings between</em>
<a id='L13' name='L13'></a> 13 <em class='comment'> * different encodings.</em>
<a id='L14' name='L14'></a> 14 <em class='comment'> * (implemented directly in strutil.c)</em>
<a id='L15' name='L15'></a> 15 <em class='comment'> * 2. functions, that hide differences between encodings derived from ASCII.</em>
<a id='L16' name='L16'></a> 16 <em class='comment'> * (implemented separately in strutilascii.c, strutil8bit.c, strutilutf8.c)</em>
<a id='L17' name='L17'></a> 17 <em class='comment'> * documentation is made for UTF-8 version of functions.</em>
<a id='L18' name='L18'></a> 18 <em class='comment'> */</em>
<a id='L19' name='L19'></a> 19
<a id='L20' name='L20'></a> 20 <em class='comment'>/* invalid strings</em>
<a id='L21' name='L21'></a> 21 <em class='comment'> * function, that works with invalid strings are marked with "I"</em>
<a id='L22' name='L22'></a> 22 <em class='comment'> * in documentation</em>
<a id='L23' name='L23'></a> 23 <em class='comment'> * invalid bytes of string are handled as one byte characters with width 1, they</em>
<a id='L24' name='L24'></a> 24 <em class='comment'> * are displayed as question marks, I-marked comparing functions try to keep</em>
<a id='L25' name='L25'></a> 25 <em class='comment'> * the original value of these bytes.</em>
<a id='L26' name='L26'></a> 26 <em class='comment'> */</em>
<a id='L27' name='L27'></a> 27
<a id='L28' name='L28'></a> 28 <em class='comment'>/* combining characters</em>
<a id='L29' name='L29'></a> 29 <em class='comment'> * displaying: all handled as zero with characters, expect combing character</em>
<a id='L30' name='L30'></a> 30 <em class='comment'> * at the begin of string, this character has with one (space add before),</em>
<a id='L31' name='L31'></a> 31 <em class='comment'> * so str_term_width is not good for computing width of singles characters</em>
<a id='L32' name='L32'></a> 32 <em class='comment'> * (never return zero, expect empty string)</em>
<a id='L33' name='L33'></a> 33 <em class='comment'> * for compatibility are strings composed before displaying</em>
<a id='L34' name='L34'></a> 34 <em class='comment'> * comparing: comparing decompose all string before comparing, n-compare</em>
<a id='L35' name='L35'></a> 35 <em class='comment'> * functions do not work as is usual, because same strings do not have to be</em>
<a id='L36' name='L36'></a> 36 <em class='comment'> * same length in UTF-8. So they return 0 if one string is prefix of the other</em>
<a id='L37' name='L37'></a> 37 <em class='comment'> * one.</em>
<a id='L38' name='L38'></a> 38 <em class='comment'> * str_prefix is used to determine, how many characters from one string are</em>
<a id='L39' name='L39'></a> 39 <em class='comment'> * prefix in second string. However, str_prefix return number of characters in</em>
<a id='L40' name='L40'></a> 40 <em class='comment'> * decompose form. (used in do_search (screen.c))</em>
<a id='L41' name='L41'></a> 41 <em class='comment'> */</em>
<a id='L42' name='L42'></a> 42
<a id='L43' name='L43'></a> 43 <em class='comment'>/*** typedefs(not structures) and defined constants **********************************************/</em>
<a id='L44' name='L44'></a> 44
<a id='L45' name='L45'></a> 45 <em class='sharp'>#define</em> <a href='../R/IS_FIT.html' title='Multiple referred from 4 places.'>IS_FIT</a>(<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>) ((<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>) &amp; 0x0010)
<a id='L46' name='L46'></a> 46 <em class='sharp'>#define</em> <a href='../S/src--filemanager--panel.c.html#L1740' title='Referred from 1740 in src/filemanager/panel.c.'>MAKE_FIT</a>(<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>) ((<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>) | 0x0010)
<a id='L47' name='L47'></a> 47 <em class='sharp'>#define</em> <a href='../R/HIDE_FIT.html' title='Multiple referred from 7 places.'>HIDE_FIT</a>(<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>) ((<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>) &amp; 0x000f)
<a id='L48' name='L48'></a> 48
<a id='L49' name='L49'></a> 49 <em class='sharp'>#define</em> <a href='../R/INVALID_CONV.html' title='Multiple referred from 46 places.'>INVALID_CONV</a> ((<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a>) (-1))
<a id='L50' name='L50'></a> 50
<a id='L51' name='L51'></a> 51 <em class='comment'>/*** enums ***************************************************************************************/</em>
<a id='L52' name='L52'></a> 52
<a id='L53' name='L53'></a> 53 <em class='comment'>/* results of conversion function</em>
<a id='L54' name='L54'></a> 54 <em class='comment'> */</em>
<a id='L55' name='L55'></a> 55 <strong class='reserved'>typedef</strong> <strong class='reserved'>enum</strong>
<a id='L56' name='L56'></a> 56 <em class='brace'>{</em>
<a id='L57' name='L57'></a> 57 <em class='comment'>/* Success means, that the conversion has been finished successfully</em>
<a id='L58' name='L58'></a> 58 <em class='comment'> */</em>
<a id='L59' name='L59'></a> 59 <a href='../R/ESTR_SUCCESS.html' title='Multiple referred from 15 places.'>ESTR_SUCCESS</a> = 0,
<a id='L60' name='L60'></a> 60 <em class='comment'>/* Problem means, that not every character was successfully converted (some are</em>
<a id='L61' name='L61'></a> 61 <em class='comment'> * replaced with question marks). So it is impossible to convert string back.</em>
<a id='L62' name='L62'></a> 62 <em class='comment'> */</em>
<a id='L63' name='L63'></a> 63 <a href='../R/ESTR_PROBLEM.html' title='Multiple referred from 8 places.'>ESTR_PROBLEM</a> = 1,
<a id='L64' name='L64'></a> 64 <em class='comment'>/* Failure means, that the conversion is not possible (example: wrong encoding</em>
<a id='L65' name='L65'></a> 65 <em class='comment'> * of the input string)</em>
<a id='L66' name='L66'></a> 66 <em class='comment'> */</em>
<a id='L67' name='L67'></a> 67 <a href='../R/ESTR_FAILURE.html' title='Multiple referred from 19 places.'>ESTR_FAILURE</a> = 2
<a id='L68' name='L68'></a> 68 <em class='brace'>}</em> <a href='../R/estr_t.html' title='Multiple referred from 25 places.'>estr_t</a>;
<a id='L69' name='L69'></a> 69
<a id='L70' name='L70'></a> 70 <em class='comment'>/* alignment strings on terminal</em>
<a id='L71' name='L71'></a> 71 <em class='comment'> */</em>
<a id='L72' name='L72'></a> 72 <strong class='reserved'>typedef</strong> <strong class='reserved'>enum</strong>
<a id='L73' name='L73'></a> 73 <em class='brace'>{</em>
<a id='L74' name='L74'></a> 74 <a href='../R/J_LEFT.html' title='Multiple referred from 9 places.'>J_LEFT</a> = 0x01,
<a id='L75' name='L75'></a> 75 <a href='../R/J_RIGHT.html' title='Multiple referred from 22 places.'>J_RIGHT</a> = 0x02,
<a id='L76' name='L76'></a> 76 <a href='../R/J_CENTER.html' title='Multiple referred from 7 places.'>J_CENTER</a> = 0x03,
<a id='L77' name='L77'></a> 77 <em class='comment'>/* if there is enough space for string on terminal,</em>
<a id='L78' name='L78'></a> 78 <em class='comment'> * string is centered otherwise is aligned to the left */</em>
<a id='L79' name='L79'></a> 79 <a href='../R/J_CENTER_LEFT.html' title='Multiple referred from 5 places.'>J_CENTER_LEFT</a> = 0x04,
<a id='L80' name='L80'></a> 80 <em class='comment'>// fit alignment: if string is too long, truncate with '~'</em>
<a id='L81' name='L81'></a> 81 <a href='../R/J_LEFT_FIT.html' title='Multiple referred from 21 places.'>J_LEFT_FIT</a> = 0x11,
<a id='L82' name='L82'></a> 82 J_RIGHT_FIT = 0x12,
<a id='L83' name='L83'></a> 83 J_CENTER_FIT = 0x13,
<a id='L84' name='L84'></a> 84 J_CENTER_LEFT_FIT = 0x14
<a id='L85' name='L85'></a> 85 <em class='brace'>}</em> <a href='../R/align_crt_t.html' title='Multiple referred from 10 places.'>align_crt_t</a>;
<a id='L86' name='L86'></a> 86
<a id='L87' name='L87'></a> 87 <em class='comment'>/* string-to-integer parsing results</em>
<a id='L88' name='L88'></a> 88 <em class='comment'> */</em>
<a id='L89' name='L89'></a> 89 <strong class='reserved'>typedef</strong> <strong class='reserved'>enum</strong>
<a id='L90' name='L90'></a> 90 <em class='brace'>{</em>
<a id='L91' name='L91'></a> 91 <a href='../R/LONGINT_OK.html' title='Multiple referred from 5 places.'>LONGINT_OK</a> = 0,
<a id='L92' name='L92'></a> 92
<a id='L93' name='L93'></a> 93 <em class='comment'>// These two values can be ORed together, to indicate that both errors occurred.</em>
<a id='L94' name='L94'></a> 94 <a href='../R/LONGINT_OVERFLOW.html' title='Multiple referred from 3 places.'>LONGINT_OVERFLOW</a> = 1,
<a id='L95' name='L95'></a> 95 <a href='../R/LONGINT_INVALID_SUFFIX_CHAR.html' title='Multiple referred from 5 places.'>LONGINT_INVALID_SUFFIX_CHAR</a> = 2,
<a id='L96' name='L96'></a> 96
<a id='L97' name='L97'></a> 97 LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW = (<a href='../S/lib--strutil.h.html#L95' title='Defined at 95 in lib/strutil.h.'>LONGINT_INVALID_SUFFIX_CHAR</a> | <a href='../S/lib--strutil.h.html#L94' title='Defined at 94 in lib/strutil.h.'>LONGINT_OVERFLOW</a>),
<a id='L98' name='L98'></a> 98 <a href='../R/LONGINT_INVALID.html' title='Multiple referred from 3 places.'>LONGINT_INVALID</a> = 4
<a id='L99' name='L99'></a> 99 <em class='brace'>}</em> <a href='../R/strtol_error_t.html' title='Multiple referred from 8 places.'>strtol_error_t</a>;
<a id='L100' name='L100'></a> 100
<a id='L101' name='L101'></a> 101 <em class='comment'>/*** structures declarations (and typedefs of structures)*****************************************/</em>
<a id='L102' name='L102'></a> 102
<a id='L103' name='L103'></a> 103 <em class='comment'>/* all functions in str_class must be defined for every encoding */</em>
<a id='L104' name='L104'></a> 104 <strong class='reserved'>struct</strong> <a href='../R/str_class.html' title='Multiple referred from 10 places.'>str_class</a>
<a id='L105' name='L105'></a> 105 <em class='brace'>{</em>
<a id='L106' name='L106'></a> 106 <a href='../Y/gchar.html' title='Multiple used in 321 places.'>gchar</a> *(*<a href='../Y/conv_gerror_message.html' title='Multiple used in 5 places.'>conv_gerror_message</a>) (<a href='../Y/GError.html' title='Multiple used in 184 places.'>GError</a> *<a href='../Y/error.html' title='Multiple used in 270 places.'>error</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/def_msg.html' title='Multiple used in 11 places.'>def_msg</a>);
<a id='L107' name='L107'></a> 107 <em class='comment'>/*I*/</em> <a href='../S/lib--strutil.h.html#L68' title='Defined at 68 in lib/strutil.h.'>estr_t</a> (*<a href='../Y/vfs_convert_to.html' title='Multiple used in 5 places.'>vfs_convert_to</a>) (<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/coder.html' title='Multiple used in 36 places.'>coder</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/string.html' title='Multiple used in 111 places.'>string</a>, <strong class='reserved'>int</strong> <a href='../Y/size.html' title='Multiple used in 385 places.'>size</a>, <a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>);
<a id='L108' name='L108'></a> 108 <em class='comment'>/*I*/</em> <strong class='reserved'>void</strong> (*<a href='../Y/insert_replace_char.html' title='Multiple used in 5 places.'>insert_replace_char</a>) (<a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>);
<a id='L109' name='L109'></a> 109 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/is_valid_string.html' title='Multiple used in 5 places.'>is_valid_string</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L110' name='L110'></a> 110 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/is_valid_char.html' title='Multiple used in 5 places.'>is_valid_char</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/size.html' title='Multiple used in 385 places.'>size</a>);
<a id='L111' name='L111'></a> 111 <em class='comment'>/*I*/</em> <strong class='reserved'>void</strong> (*<a href='../Y/cnext_char.html' title='Multiple used in 8 places.'>cnext_char</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L112' name='L112'></a> 112 <strong class='reserved'>void</strong> (*<a href='../Y/cprev_char.html' title='Multiple used in 8 places.'>cprev_char</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L113' name='L113'></a> 113 <strong class='reserved'>void</strong> (*<a href='../Y/cnext_char_safe.html' title='Multiple used in 8 places.'>cnext_char_safe</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L114' name='L114'></a> 114 <em class='comment'>/*I*/</em> <strong class='reserved'>void</strong> (*<a href='../Y/cprev_char_safe.html' title='Multiple used in 8 places.'>cprev_char_safe</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L115' name='L115'></a> 115 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/cnext_noncomb_char.html' title='Multiple used in 6 places.'>cnext_noncomb_char</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L116' name='L116'></a> 116 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/cprev_noncomb_char.html' title='Multiple used in 6 places.'>cprev_noncomb_char</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/begin.html' title='Multiple used in 22 places.'>begin</a>);
<a id='L117' name='L117'></a> 117 <em class='comment'>/*I*/</em> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_isspace.html' title='Multiple used in 6 places.'>char_isspace</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L118' name='L118'></a> 118 <em class='comment'>/*I*/</em> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_ispunct.html' title='Multiple used in 6 places.'>char_ispunct</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L119' name='L119'></a> 119 <em class='comment'>/*I*/</em> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_isalnum.html' title='Multiple used in 6 places.'>char_isalnum</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L120' name='L120'></a> 120 <em class='comment'>/*I*/</em> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_isdigit.html' title='Multiple used in 6 places.'>char_isdigit</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L121' name='L121'></a> 121 <em class='comment'>/*I*/</em> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_isprint.html' title='Multiple used in 17 places.'>char_isprint</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L122' name='L122'></a> 122 <em class='comment'>/*I*/</em> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_iscombiningmark.html' title='Multiple used in 5 places.'>char_iscombiningmark</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L123' name='L123'></a> 123 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/length.html' title='Multiple used in 182 places.'>length</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L124' name='L124'></a> 124 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/length2.html' title='Multiple used in 5 places.'>length2</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>int</strong> <a href='../Y/size.html' title='Multiple used in 385 places.'>size</a>);
<a id='L125' name='L125'></a> 125 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/length_noncomb.html' title='Multiple used in 5 places.'>length_noncomb</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L126' name='L126'></a> 126 <em class='comment'>/*I*/</em> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_toupper.html' title='Multiple used in 7 places.'>char_toupper</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>, <strong class='reserved'>char</strong> **<a href='../Y/out.html' title='Multiple used in 87 places.'>out</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> *<a href='../Y/remain.html' title='Multiple used in 114 places.'>remain</a>);
<a id='L127' name='L127'></a> 127 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> (*<a href='../Y/char_tolower.html' title='Multiple used in 7 places.'>char_tolower</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>, <strong class='reserved'>char</strong> **<a href='../Y/out.html' title='Multiple used in 87 places.'>out</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> *<a href='../Y/remain.html' title='Multiple used in 114 places.'>remain</a>);
<a id='L128' name='L128'></a> 128 <strong class='reserved'>void</strong> (*<a href='../Y/fix_string.html' title='Multiple used in 5 places.'>fix_string</a>) (<strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L129' name='L129'></a> 129 <em class='comment'>/*I*/</em> <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *(*<a href='../S/lib--strutil--strutilutf8.c.html#L53' title='Defined at 53 in lib/strutil/strutilutf8.c.'>term_form</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L130' name='L130'></a> 130 <em class='comment'>/*I*/</em> <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *(*<a href='../Y/fit_to_term.html' title='Multiple used in 5 places.'>fit_to_term</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>int</strong> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>, <a href='../S/lib--strutil.h.html#L85' title='Defined at 85 in lib/strutil.h.'>align_crt_t</a> <a href='../Y/just_mode.html' title='Multiple used in 23 places.'>just_mode</a>);
<a id='L131' name='L131'></a> 131 <em class='comment'>/*I*/</em> <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *(*<a href='../Y/term_trim.html' title='Multiple used in 5 places.'>term_trim</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L132' name='L132'></a> 132 <em class='comment'>/*I*/</em> <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *(*<a href='../Y/term_substring.html' title='Multiple used in 5 places.'>term_substring</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>int</strong> <a href='../S/src--editor--etags.c.html#L199' title='Defined at 199 in src/editor/etags.c.'>start</a>, <strong class='reserved'>int</strong> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L133' name='L133'></a> 133 <em class='comment'>/*I*/</em> <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> (*<a href='../Y/term_width1.html' title='Multiple used in 5 places.'>term_width1</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L134' name='L134'></a> 134 <em class='comment'>/*I*/</em> <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> (*<a href='../Y/term_width2.html' title='Multiple used in 5 places.'>term_width2</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L135' name='L135'></a> 135 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/term_char_width.html' title='Multiple used in 5 places.'>term_char_width</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/length.html' title='Multiple used in 182 places.'>length</a>);
<a id='L136' name='L136'></a> 136 <em class='comment'>/*I*/</em> <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *(*<a href='../Y/trunc.html' title='Multiple used in 5 places.'>trunc</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/length.html' title='Multiple used in 182 places.'>length</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L137' name='L137'></a> 137 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/offset_to_pos.html' title='Multiple used in 5 places.'>offset_to_pos</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/length.html' title='Multiple used in 182 places.'>length</a>);
<a id='L138' name='L138'></a> 138 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/column_to_pos.html' title='Multiple used in 5 places.'>column_to_pos</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/pos.html' title='Multiple used in 315 places.'>pos</a>);
<a id='L139' name='L139'></a> 139 <em class='comment'>/*I*/</em> <strong class='reserved'>char</strong> *(*<a href='../Y/create_search_needle.html' title='Multiple used in 5 places.'>create_search_needle</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L140' name='L140'></a> 140 <strong class='reserved'>void</strong> (*<a href='../Y/release_search_needle.html' title='Multiple used in 5 places.'>release_search_needle</a>) (<strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L141' name='L141'></a> 141 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *(*<a href='../Y/search_first.html' title='Multiple used in 5 places.'>search_first</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L142' name='L142'></a> 142 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *(*<a href='../Y/search_last.html' title='Multiple used in 5 places.'>search_last</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L143' name='L143'></a> 143 <strong class='reserved'>int</strong> (*<a href='../Y/compare.html' title='Multiple used in 5 places.'>compare</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L144' name='L144'></a> 144 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/ncompare.html' title='Multiple used in 5 places.'>ncompare</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L145' name='L145'></a> 145 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/casecmp.html' title='Multiple used in 5 places.'>casecmp</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L146' name='L146'></a> 146 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/ncasecmp.html' title='Multiple used in 5 places.'>ncasecmp</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L147' name='L147'></a> 147 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/prefix.html' title='Multiple used in 85 places.'>prefix</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/prefix.html' title='Multiple used in 85 places.'>prefix</a>);
<a id='L148' name='L148'></a> 148 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../Y/caseprefix.html' title='Multiple used in 5 places.'>caseprefix</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/prefix.html' title='Multiple used in 85 places.'>prefix</a>);
<a id='L149' name='L149'></a> 149 <em class='comment'>/*I*/</em> <strong class='reserved'>char</strong> *(*<a href='../Y/create_key.html' title='Multiple used in 5 places.'>create_key</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L150' name='L150'></a> 150 <em class='comment'>/*I*/</em> <strong class='reserved'>char</strong> *(*<a href='../Y/create_key_for_filename.html' title='Multiple used in 6 places.'>create_key_for_filename</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L151' name='L151'></a> 151 <em class='comment'>/*I*/</em> <strong class='reserved'>int</strong> (*<a href='../S/src--filemanager--dir.c.html#L83' title='Defined at 83 in src/filemanager/dir.c.'>key_collate</a>) (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L152' name='L152'></a> 152 <em class='comment'>/*I*/</em> <strong class='reserved'>void</strong> (*<a href='../Y/release_key.html' title='Multiple used in 5 places.'>release_key</a>) (<strong class='reserved'>char</strong> *<a href='../Y/key.html' title='Multiple used in 190 places.'>key</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L153' name='L153'></a> 153 <em class='brace'>}</em>;
<a id='L154' name='L154'></a> 154
<a id='L155' name='L155'></a> 155 <em class='comment'>/*** global variables defined in .c file *********************************************************/</em>
<a id='L156' name='L156'></a> 156
<a id='L157' name='L157'></a> 157 <em class='comment'>/* standard converters */</em>
<a id='L158' name='L158'></a> 158 <strong class='reserved'>extern</strong> <a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/str_cnv_to_term.html' title='Multiple used in 3 places.'>str_cnv_to_term</a>;
<a id='L159' name='L159'></a> 159 <strong class='reserved'>extern</strong> <a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/str_cnv_from_term.html' title='Multiple used in 19 places.'>str_cnv_from_term</a>;
<a id='L160' name='L160'></a> 160 <em class='comment'>/* from terminal encoding to terminal encoding */</em>
<a id='L161' name='L161'></a> 161 <strong class='reserved'>extern</strong> <a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/str_cnv_not_convert.html' title='Multiple used in 17 places.'>str_cnv_not_convert</a>;
<a id='L162' name='L162'></a> 162
<a id='L163' name='L163'></a> 163 <em class='comment'>/*** declarations of public functions ************************************************************/</em>
<a id='L164' name='L164'></a> 164
<a id='L165' name='L165'></a> 165 <strong class='reserved'>struct</strong> <a href='../S/lib--strutil.h.html#L104' title='Defined at 104 in lib/strutil.h.'>str_class</a> <a href='../S/lib--strutil--strutilutf8.c.html#L1483' title='Defined at 1483 in lib/strutil/strutilutf8.c.'>str_utf8_init</a> (<strong class='reserved'>void</strong>);
<a id='L166' name='L166'></a> 166 <strong class='reserved'>struct</strong> <a href='../S/lib--strutil.h.html#L104' title='Defined at 104 in lib/strutil.h.'>str_class</a> <a href='../S/lib--strutil--strutil8bit.c.html#L818' title='Defined at 818 in lib/strutil/strutil8bit.c.'>str_8bit_init</a> (<strong class='reserved'>void</strong>);
<a id='L167' name='L167'></a> 167 <strong class='reserved'>struct</strong> <a href='../S/lib--strutil.h.html#L104' title='Defined at 104 in lib/strutil.h.'>str_class</a> <a href='../S/lib--strutil--strutilascii.c.html#L748' title='Defined at 748 in lib/strutil/strutilascii.c.'>str_ascii_init</a> (<strong class='reserved'>void</strong>);
<a id='L168' name='L168'></a> 168
<a id='L169' name='L169'></a> 169 <em class='comment'>/* create converter from "from_enc" to terminal encoding</em>
<a id='L170' name='L170'></a> 170 <em class='comment'> * if "from_enc" is not supported return INVALID_CONV</em>
<a id='L171' name='L171'></a> 171 <em class='comment'> */</em>
<a id='L172' name='L172'></a> 172 <a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../S/lib--strutil--strutil.c.html#L269' title='Defined at 269 in lib/strutil/strutil.c.'>str_crt_conv_from</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/from_enc.html' title='Multiple used in 3 places.'>from_enc</a>);
<a id='L173' name='L173'></a> 173
<a id='L174' name='L174'></a> 174 <em class='comment'>/* create converter from terminal encoding to "to_enc"</em>
<a id='L175' name='L175'></a> 175 <em class='comment'> * if "to_enc" is not supported return INVALID_CONV</em>
<a id='L176' name='L176'></a> 176 <em class='comment'> */</em>
<a id='L177' name='L177'></a> 177 <a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../S/lib--strutil--strutil.c.html#L261' title='Defined at 261 in lib/strutil/strutil.c.'>str_crt_conv_to</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/to_enc.html' title='Multiple used in 3 places.'>to_enc</a>);
<a id='L178' name='L178'></a> 178
<a id='L179' name='L179'></a> 179 <em class='comment'>/* close converter, do not close str_cnv_to_term, str_cnv_from_term,</em>
<a id='L180' name='L180'></a> 180 <em class='comment'> * str_cnv_not_convert</em>
<a id='L181' name='L181'></a> 181 <em class='comment'> */</em>
<a id='L182' name='L182'></a> 182 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L278' title='Defined at 278 in lib/strutil/strutil.c.'>str_close_conv</a> (<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/conv.html' title='Multiple used in 113 places.'>conv</a>);
<a id='L183' name='L183'></a> 183
<a id='L184' name='L184'></a> 184 <em class='comment'>/* return on of not used buffers (.used == 0) or create new</em>
<a id='L185' name='L185'></a> 185 <em class='comment'> * returned buffer has set .used to 1</em>
<a id='L186' name='L186'></a> 186 <em class='comment'> */</em>
<a id='L187' name='L187'></a> 187
<a id='L188' name='L188'></a> 188 <em class='comment'>/* convert string using coder, result of conversion is appended at end of buffer</em>
<a id='L189' name='L189'></a> 189 <em class='comment'> * return ESTR_SUCCESS if there was no problem.</em>
<a id='L190' name='L190'></a> 190 <em class='comment'> * otherwise return ESTR_PROBLEM or ESTR_FAILURE</em>
<a id='L191' name='L191'></a> 191 <em class='comment'> */</em>
<a id='L192' name='L192'></a> 192 <a href='../S/lib--strutil.h.html#L68' title='Defined at 68 in lib/strutil.h.'>estr_t</a> <a href='../S/lib--strutil--strutil.c.html#L287' title='Defined at 287 in lib/strutil/strutil.c.'>str_convert</a> (<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/coder.html' title='Multiple used in 36 places.'>coder</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/string.html' title='Multiple used in 111 places.'>string</a>, <a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>);
<a id='L193' name='L193'></a> 193 <a href='../S/lib--strutil.h.html#L68' title='Defined at 68 in lib/strutil.h.'>estr_t</a> <a href='../S/lib--strutil--strutil.c.html#L295' title='Defined at 295 in lib/strutil/strutil.c.'>str_nconvert</a> (<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/coder.html' title='Multiple used in 36 places.'>coder</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/string.html' title='Multiple used in 111 places.'>string</a>, <strong class='reserved'>int</strong> <a href='../Y/size.html' title='Multiple used in 385 places.'>size</a>, <a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>);
<a id='L194' name='L194'></a> 194
<a id='L195' name='L195'></a> 195 <em class='comment'>/* convert GError message (which in UTF-8) to terminal charset</em>
<a id='L196' name='L196'></a> 196 <em class='comment'> * def_char is used if result of error-&gt;str conversion if ESTR_FAILURE</em>
<a id='L197' name='L197'></a> 197 <em class='comment'> * return new allocated null-terminated string, which is need to be freed</em>
<a id='L198' name='L198'></a> 198 <em class='comment'> * I</em>
<a id='L199' name='L199'></a> 199 <em class='comment'> */</em>
<a id='L200' name='L200'></a> 200 <a href='../Y/gchar.html' title='Multiple used in 321 places.'>gchar</a> *<a href='../S/lib--strutil--strutil.c.html#L303' title='Defined at 303 in lib/strutil/strutil.c.'>str_conv_gerror_message</a> (<a href='../Y/GError.html' title='Multiple used in 184 places.'>GError</a> *<a href='../Y/error.html' title='Multiple used in 270 places.'>error</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/def_msg.html' title='Multiple used in 11 places.'>def_msg</a>);
<a id='L201' name='L201'></a> 201
<a id='L202' name='L202'></a> 202 <em class='comment'>/* return only ESTR_SUCCESS or ESTR_FAILURE, because vfs must be able to convert</em>
<a id='L203' name='L203'></a> 203 <em class='comment'> * result to original string. (so no replace with questionmark)</em>
<a id='L204' name='L204'></a> 204 <em class='comment'> * if coder is str_cnv_from_term or str_cnv_not_convert, string is only copied,</em>
<a id='L205' name='L205'></a> 205 <em class='comment'> * so is possible to show file, that is not valid in terminal encoding</em>
<a id='L206' name='L206'></a> 206 <em class='comment'> */</em>
<a id='L207' name='L207'></a> 207 <a href='../S/lib--strutil.h.html#L68' title='Defined at 68 in lib/strutil.h.'>estr_t</a> <a href='../S/lib--strutil--strutil.c.html#L311' title='Defined at 311 in lib/strutil/strutil.c.'>str_vfs_convert_from</a> (<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/coder.html' title='Multiple used in 36 places.'>coder</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/string.html' title='Multiple used in 111 places.'>string</a>, <a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>);
<a id='L208' name='L208'></a> 208
<a id='L209' name='L209'></a> 209 <em class='comment'>/* if coder is str_cnv_to_term or str_cnv_not_convert, string is only copied,</em>
<a id='L210' name='L210'></a> 210 <em class='comment'> * does replace with question mark</em>
<a id='L211' name='L211'></a> 211 <em class='comment'> * I</em>
<a id='L212' name='L212'></a> 212 <em class='comment'> */</em>
<a id='L213' name='L213'></a> 213 <a href='../S/lib--strutil.h.html#L68' title='Defined at 68 in lib/strutil.h.'>estr_t</a> <a href='../S/lib--strutil--strutil.c.html#L326' title='Defined at 326 in lib/strutil/strutil.c.'>str_vfs_convert_to</a> (<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/coder.html' title='Multiple used in 36 places.'>coder</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/string.html' title='Multiple used in 111 places.'>string</a>, <strong class='reserved'>int</strong> <a href='../Y/size.html' title='Multiple used in 385 places.'>size</a>, <a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>);
<a id='L214' name='L214'></a> 214
<a id='L215' name='L215'></a> 215 <em class='comment'>/* printf function for str_buffer, append result of printf at the end of buffer</em>
<a id='L216' name='L216'></a> 216 <em class='comment'> */</em>
<a id='L217' name='L217'></a> 217 <strong class='reserved'>void</strong> <a href='../R/str_printf.html' title='Multiple referred from 6 places.'>str_printf</a> (<a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/format.html' title='Multiple used in 125 places.'>format</a>, ...) <a href='../D/G_GNUC_PRINTF.html' title='Multiple defined in 6 places.'>G_GNUC_PRINTF</a> (2, 3);
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><a href='#L616'><img class='icon' src='../icons/right.png' alt='[next]' /></a><img class='icon' src='../icons/n_first.png' alt='[first]' /><a href='#L672'><img class='icon' src='../icons/last.png' alt='[last]' /></a><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+217 lib/strutil.h' /> */</em>
<a id='L218' name='L218'></a> 218
<a id='L219' name='L219'></a> 219 <em class='comment'>/* add standard replacement character in terminal encoding</em>
<a id='L220' name='L220'></a> 220 <em class='comment'> */</em>
<a id='L221' name='L221'></a> 221 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L346' title='Defined at 346 in lib/strutil/strutil.c.'>str_insert_replace_char</a> (<a href='../Y/GString.html' title='Multiple used in 317 places.'>GString</a> *<a href='../Y/buffer.html' title='Multiple used in 996 places.'>buffer</a>);
<a id='L222' name='L222'></a> 222
<a id='L223' name='L223'></a> 223 <em class='comment'>/* init strings and set terminal encoding,</em>
<a id='L224' name='L224'></a> 224 <em class='comment'> * if is termenc NULL, detect terminal encoding</em>
<a id='L225' name='L225'></a> 225 <em class='comment'> * create all str_cnv_* and set functions for terminal encoding</em>
<a id='L226' name='L226'></a> 226 <em class='comment'> */</em>
<a id='L227' name='L227'></a> 227 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L401' title='Defined at 401 in lib/strutil/strutil.c.'>str_init_strings</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/termenc.html' title='Multiple used in 4 places.'>termenc</a>);
<a id='L228' name='L228'></a> 228
<a id='L229' name='L229'></a> 229 <em class='comment'>/* free all str_buffer and all str_cnv_*</em>
<a id='L230' name='L230'></a> 230 <em class='comment'> */</em>
<a id='L231' name='L231'></a> 231 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L432' title='Defined at 432 in lib/strutil/strutil.c.'>str_uninit_strings</a> (<strong class='reserved'>void</strong>);
<a id='L232' name='L232'></a> 232
<a id='L233' name='L233'></a> 233 <em class='comment'>/* try convert characters in ch to output using conv</em>
<a id='L234' name='L234'></a> 234 <em class='comment'> * ch_size is size of ch, can by (size_t)(-1) (-1 only for ASCII</em>
<a id='L235' name='L235'></a> 235 <em class='comment'> * compatible encoding, for other must be set)</em>
<a id='L236' name='L236'></a> 236 <em class='comment'> * return ESTR_SUCCESS if conversion was successfully,</em>
<a id='L237' name='L237'></a> 237 <em class='comment'> * ESTR_PROBLEM if ch contains only part of characters,</em>
<a id='L238' name='L238'></a> 238 <em class='comment'> * ESTR_FAILURE if conversion is not possible</em>
<a id='L239' name='L239'></a> 239 <em class='comment'> */</em>
<a id='L240' name='L240'></a> 240 <a href='../S/lib--strutil.h.html#L68' title='Defined at 68 in lib/strutil.h.'>estr_t</a> <a href='../S/lib--strutil--strutil.c.html#L354' title='Defined at 354 in lib/strutil/strutil.c.'>str_translate_char</a> (<a href='../Y/GIConv.html' title='Multiple used in 62 places.'>GIConv</a> <a href='../Y/conv.html' title='Multiple used in 113 places.'>conv</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/ch_size.html' title='Multiple used in 3 places.'>ch_size</a>, <strong class='reserved'>char</strong> *<a href='../Y/output.html' title='Multiple used in 10 places.'>output</a>,
<a id='L241' name='L241'></a> 241 <strong class='reserved'>const</strong> <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/out_size.html' title='Multiple used in 3 places.'>out_size</a>);
<a id='L242' name='L242'></a> 242
<a id='L243' name='L243'></a> 243 <em class='comment'>/* test, if text is valid in terminal encoding</em>
<a id='L244' name='L244'></a> 244 <em class='comment'> * I</em>
<a id='L245' name='L245'></a> 245 <em class='comment'> */</em>
<a id='L246' name='L246'></a> 246 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L835' title='Defined at 835 in lib/strutil/strutil.c.'>str_is_valid_string</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L247' name='L247'></a> 247
<a id='L248' name='L248'></a> 248 <em class='comment'>/* test, if first char of ch is valid</em>
<a id='L249' name='L249'></a> 249 <em class='comment'> * size, how many bytes characters occupied, could be (size_t)(-1)</em>
<a id='L250' name='L250'></a> 250 <em class='comment'> * return 1 if it is valid, -1 if it is invalid or -2 if it is only part of</em>
<a id='L251' name='L251'></a> 251 <em class='comment'> * multibyte character</em>
<a id='L252' name='L252'></a> 252 <em class='comment'> * I</em>
<a id='L253' name='L253'></a> 253 <em class='comment'> */</em>
<a id='L254' name='L254'></a> 254 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L645' title='Defined at 645 in lib/strutil/strutil.c.'>str_is_valid_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/size.html' title='Multiple used in 385 places.'>size</a>);
<a id='L255' name='L255'></a> 255
<a id='L256' name='L256'></a> 256 <em class='comment'>/* return next characters after text, do not call on the end of string</em>
<a id='L257' name='L257'></a> 257 <em class='comment'> */</em>
<a id='L258' name='L258'></a> 258 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L476' title='Defined at 476 in lib/strutil/strutil.c.'>str_get_next_char</a> (<strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L259' name='L259'></a> 259 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L486' title='Defined at 486 in lib/strutil/strutil.c.'>str_cget_next_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L260' name='L260'></a> 260
<a id='L261' name='L261'></a> 261 <em class='comment'>/* return previous characters before text, do not call on the start of strings</em>
<a id='L262' name='L262'></a> 262 <em class='comment'> */</em>
<a id='L263' name='L263'></a> 263 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L511' title='Defined at 511 in lib/strutil/strutil.c.'>str_get_prev_char</a> (<strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L264' name='L264'></a> 264 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L520' title='Defined at 520 in lib/strutil/strutil.c.'>str_cget_prev_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L265' name='L265'></a> 265
<a id='L266' name='L266'></a> 266 <em class='comment'>/* set text to next characters, do not call on the end of string</em>
<a id='L267' name='L267'></a> 267 <em class='comment'> */</em>
<a id='L268' name='L268'></a> 268 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L495' title='Defined at 495 in lib/strutil/strutil.c.'>str_next_char</a> (<strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L269' name='L269'></a> 269 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L503' title='Defined at 503 in lib/strutil/strutil.c.'>str_cnext_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L270' name='L270'></a> 270
<a id='L271' name='L271'></a> 271 <em class='comment'>/* set text to previous characters, do not call on the start of strings</em>
<a id='L272' name='L272'></a> 272 <em class='comment'> */</em>
<a id='L273' name='L273'></a> 273 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L529' title='Defined at 529 in lib/strutil/strutil.c.'>str_prev_char</a> (<strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L274' name='L274'></a> 274 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L537' title='Defined at 537 in lib/strutil/strutil.c.'>str_cprev_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L275' name='L275'></a> 275
<a id='L276' name='L276'></a> 276 <em class='comment'>/* return next characters after text, do not call on the end of string</em>
<a id='L277' name='L277'></a> 277 <em class='comment'> * works with invalid string</em>
<a id='L278' name='L278'></a> 278 <em class='comment'> * I</em>
<a id='L279' name='L279'></a> 279 <em class='comment'> */</em>
<a id='L280' name='L280'></a> 280 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L545' title='Defined at 545 in lib/strutil/strutil.c.'>str_get_next_char_safe</a> (<strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L281' name='L281'></a> 281 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L554' title='Defined at 554 in lib/strutil/strutil.c.'>str_cget_next_char_safe</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L282' name='L282'></a> 282
<a id='L283' name='L283'></a> 283 <em class='comment'>/* return previous characters before text, do not call on the start of strings</em>
<a id='L284' name='L284'></a> 284 <em class='comment'> * works with invalid string</em>
<a id='L285' name='L285'></a> 285 <em class='comment'> * I</em>
<a id='L286' name='L286'></a> 286 <em class='comment'> */</em>
<a id='L287' name='L287'></a> 287 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L579' title='Defined at 579 in lib/strutil/strutil.c.'>str_get_prev_char_safe</a> (<strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L288' name='L288'></a> 288 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L588' title='Defined at 588 in lib/strutil/strutil.c.'>str_cget_prev_char_safe</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L289' name='L289'></a> 289
<a id='L290' name='L290'></a> 290 <em class='comment'>/* set text to next characters, do not call on the end of string</em>
<a id='L291' name='L291'></a> 291 <em class='comment'> * works with invalid string</em>
<a id='L292' name='L292'></a> 292 <em class='comment'> * I</em>
<a id='L293' name='L293'></a> 293 <em class='comment'> */</em>
<a id='L294' name='L294'></a> 294 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L563' title='Defined at 563 in lib/strutil/strutil.c.'>str_next_char_safe</a> (<strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L295' name='L295'></a> 295 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L571' title='Defined at 571 in lib/strutil/strutil.c.'>str_cnext_char_safe</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L296' name='L296'></a> 296
<a id='L297' name='L297'></a> 297 <em class='comment'>/* set text to previous characters, do not call on the start of strings</em>
<a id='L298' name='L298'></a> 298 <em class='comment'> * works with invalid string</em>
<a id='L299' name='L299'></a> 299 <em class='comment'> * I</em>
<a id='L300' name='L300'></a> 300 <em class='comment'> */</em>
<a id='L301' name='L301'></a> 301 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L597' title='Defined at 597 in lib/strutil/strutil.c.'>str_prev_char_safe</a> (<strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L302' name='L302'></a> 302 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L605' title='Defined at 605 in lib/strutil/strutil.c.'>str_cprev_char_safe</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L303' name='L303'></a> 303
<a id='L304' name='L304'></a> 304 <em class='comment'>/* set text to next noncombining characters, check the end of text</em>
<a id='L305' name='L305'></a> 305 <em class='comment'> * return how many characters was skipped</em>
<a id='L306' name='L306'></a> 306 <em class='comment'> * works with invalid string</em>
<a id='L307' name='L307'></a> 307 <em class='comment'> * I</em>
<a id='L308' name='L308'></a> 308 <em class='comment'> */</em>
<a id='L309' name='L309'></a> 309 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L613' title='Defined at 613 in lib/strutil/strutil.c.'>str_next_noncomb_char</a> (<strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L310' name='L310'></a> 310 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L621' title='Defined at 621 in lib/strutil/strutil.c.'>str_cnext_noncomb_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L311' name='L311'></a> 311
<a id='L312' name='L312'></a> 312 <em class='comment'>/* set text to previous noncombining characters, search stop at begin</em>
<a id='L313' name='L313'></a> 313 <em class='comment'> * return how many characters was skipped</em>
<a id='L314' name='L314'></a> 314 <em class='comment'> * works with invalid string</em>
<a id='L315' name='L315'></a> 315 <em class='comment'> * I</em>
<a id='L316' name='L316'></a> 316 <em class='comment'> */</em>
<a id='L317' name='L317'></a> 317 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L629' title='Defined at 629 in lib/strutil/strutil.c.'>str_prev_noncomb_char</a> (<strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/begin.html' title='Multiple used in 22 places.'>begin</a>);
<a id='L318' name='L318'></a> 318 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L637' title='Defined at 637 in lib/strutil/strutil.c.'>str_cprev_noncomb_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> **<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/begin.html' title='Multiple used in 22 places.'>begin</a>);
<a id='L319' name='L319'></a> 319
<a id='L320' name='L320'></a> 320 <em class='comment'>/* if first characters in ch is space, tabulator or new lines</em>
<a id='L321' name='L321'></a> 321 <em class='comment'> * I</em>
<a id='L322' name='L322'></a> 322 <em class='comment'> */</em>
<a id='L323' name='L323'></a> 323 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L731' title='Defined at 731 in lib/strutil/strutil.c.'>str_isspace</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L324' name='L324'></a> 324
<a id='L325' name='L325'></a> 325 <em class='comment'>/* if first characters in ch is punctuation or symbol</em>
<a id='L326' name='L326'></a> 326 <em class='comment'> * I</em>
<a id='L327' name='L327'></a> 327 <em class='comment'> */</em>
<a id='L328' name='L328'></a> 328 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L739' title='Defined at 739 in lib/strutil/strutil.c.'>str_ispunct</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L329' name='L329'></a> 329
<a id='L330' name='L330'></a> 330 <em class='comment'>/* if first characters in ch is alphanum</em>
<a id='L331' name='L331'></a> 331 <em class='comment'> * I</em>
<a id='L332' name='L332'></a> 332 <em class='comment'> */</em>
<a id='L333' name='L333'></a> 333 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L747' title='Defined at 747 in lib/strutil/strutil.c.'>str_isalnum</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L334' name='L334'></a> 334
<a id='L335' name='L335'></a> 335 <em class='comment'>/* if first characters in ch is digit</em>
<a id='L336' name='L336'></a> 336 <em class='comment'> * I</em>
<a id='L337' name='L337'></a> 337 <em class='comment'> */</em>
<a id='L338' name='L338'></a> 338 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L755' title='Defined at 755 in lib/strutil/strutil.c.'>str_isdigit</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L339' name='L339'></a> 339
<a id='L340' name='L340'></a> 340 <em class='comment'>/* if first characters in ch is printable</em>
<a id='L341' name='L341'></a> 341 <em class='comment'> * I</em>
<a id='L342' name='L342'></a> 342 <em class='comment'> */</em>
<a id='L343' name='L343'></a> 343 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L779' title='Defined at 779 in lib/strutil/strutil.c.'>str_isprint</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L344' name='L344'></a> 344
<a id='L345' name='L345'></a> 345 <em class='comment'>/* if first characters in ch is a combining mark (only in utf-8)</em>
<a id='L346' name='L346'></a> 346 <em class='comment'> * combining makrs are assumed to be zero width</em>
<a id='L347' name='L347'></a> 347 <em class='comment'> * I</em>
<a id='L348' name='L348'></a> 348 <em class='comment'> */</em>
<a id='L349' name='L349'></a> 349 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L787' title='Defined at 787 in lib/strutil/strutil.c.'>str_iscombiningmark</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>);
<a id='L350' name='L350'></a> 350
<a id='L351' name='L351'></a> 351 <em class='comment'>/* write lower from of first characters in ch into out</em>
<a id='L352' name='L352'></a> 352 <em class='comment'> * decrease remain by size of returned characters</em>
<a id='L353' name='L353'></a> 353 <em class='comment'> * if out is not big enough, do nothing</em>
<a id='L354' name='L354'></a> 354 <em class='comment'> */</em>
<a id='L355' name='L355'></a> 355 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L763' title='Defined at 763 in lib/strutil/strutil.c.'>str_toupper</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>, <strong class='reserved'>char</strong> **<a href='../Y/out.html' title='Multiple used in 87 places.'>out</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> *<a href='../Y/remain.html' title='Multiple used in 114 places.'>remain</a>);
<a id='L356' name='L356'></a> 356
<a id='L357' name='L357'></a> 357 <em class='comment'>/* write upper from of first characters in ch into out</em>
<a id='L358' name='L358'></a> 358 <em class='comment'> * decrease remain by size of returned characters</em>
<a id='L359' name='L359'></a> 359 <em class='comment'> * if out is not big enough, do nothing</em>
<a id='L360' name='L360'></a> 360 <em class='comment'> */</em>
<a id='L361' name='L361'></a> 361 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L771' title='Defined at 771 in lib/strutil/strutil.c.'>str_tolower</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/ch.html' title='Multiple used in 230 places.'>ch</a>, <strong class='reserved'>char</strong> **<a href='../Y/out.html' title='Multiple used in 87 places.'>out</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> *<a href='../Y/remain.html' title='Multiple used in 114 places.'>remain</a>);
<a id='L362' name='L362'></a> 362
<a id='L363' name='L363'></a> 363 <em class='comment'>/* return length of text in characters</em>
<a id='L364' name='L364'></a> 364 <em class='comment'> * I</em>
<a id='L365' name='L365'></a> 365 <em class='comment'> */</em>
<a id='L366' name='L366'></a> 366 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L691' title='Defined at 691 in lib/strutil/strutil.c.'>str_length</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L367' name='L367'></a> 367
<a id='L368' name='L368'></a> 368 <em class='comment'>/* return length of text in characters, limit to size</em>
<a id='L369' name='L369'></a> 369 <em class='comment'> * I</em>
<a id='L370' name='L370'></a> 370 <em class='comment'> */</em>
<a id='L371' name='L371'></a> 371 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L707' title='Defined at 707 in lib/strutil/strutil.c.'>str_length2</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>int</strong> <a href='../Y/size.html' title='Multiple used in 385 places.'>size</a>);
<a id='L372' name='L372'></a> 372
<a id='L373' name='L373'></a> 373 <em class='comment'>/* return length of one char</em>
<a id='L374' name='L374'></a> 374 <em class='comment'> * I</em>
<a id='L375' name='L375'></a> 375 <em class='comment'> */</em>
<a id='L376' name='L376'></a> 376 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L699' title='Defined at 699 in lib/strutil/strutil.c.'>str_length_char</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L377' name='L377'></a> 377
<a id='L378' name='L378'></a> 378 <em class='comment'>/* return length of text in characters, count only noncombining characters</em>
<a id='L379' name='L379'></a> 379 <em class='comment'> * I</em>
<a id='L380' name='L380'></a> 380 <em class='comment'> */</em>
<a id='L381' name='L381'></a> 381 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L715' title='Defined at 715 in lib/strutil/strutil.c.'>str_length_noncomb</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L382' name='L382'></a> 382
<a id='L383' name='L383'></a> 383 <em class='comment'>/* replace all invalid characters in text with questionmark</em>
<a id='L384' name='L384'></a> 384 <em class='comment'> * after return, text is valid string in terminal encoding</em>
<a id='L385' name='L385'></a> 385 <em class='comment'> * I</em>
<a id='L386' name='L386'></a> 386 <em class='comment'> */</em>
<a id='L387' name='L387'></a> 387 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L891' title='Defined at 891 in lib/strutil/strutil.c.'>str_fix_string</a> (<strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L388' name='L388'></a> 388
<a id='L389' name='L389'></a> 389 <em class='comment'>/* replace all invalid characters in text with questionmark</em>
<a id='L390' name='L390'></a> 390 <em class='comment'> * replace all unprintable characters with '.'</em>
<a id='L391' name='L391'></a> 391 <em class='comment'> * return static allocated string, "text" is not changed</em>
<a id='L392' name='L392'></a> 392 <em class='comment'> * returned string do not need to be freed</em>
<a id='L393' name='L393'></a> 393 <em class='comment'> * I</em>
<a id='L394' name='L394'></a> 394 <em class='comment'> */</em>
<a id='L395' name='L395'></a> 395 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L444' title='Defined at 444 in lib/strutil/strutil.c.'>str_term_form</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L396' name='L396'></a> 396
<a id='L397' name='L397'></a> 397 <em class='comment'>/* like str_term_form, but text can be alignment to width</em>
<a id='L398' name='L398'></a> 398 <em class='comment'> * alignment is specified in just_mode (J_LEFT, J_LEFT_FIT, ...)</em>
<a id='L399' name='L399'></a> 399 <em class='comment'> * result is completed with spaces to width</em>
<a id='L400' name='L400'></a> 400 <em class='comment'> * I</em>
<a id='L401' name='L401'></a> 401 <em class='comment'> */</em>
<a id='L402' name='L402'></a> 402 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L452' title='Defined at 452 in lib/strutil/strutil.c.'>str_fit_to_term</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>int</strong> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>, <a href='../S/lib--strutil.h.html#L85' title='Defined at 85 in lib/strutil.h.'>align_crt_t</a> <a href='../Y/just_mode.html' title='Multiple used in 23 places.'>just_mode</a>);
<a id='L403' name='L403'></a> 403
<a id='L404' name='L404'></a> 404 <em class='comment'>/* like str_term_form, but when text is wider than width, three dots are</em>
<a id='L405' name='L405'></a> 405 <em class='comment'> * inserted at begin and result is completed with suffix of text</em>
<a id='L406' name='L406'></a> 406 <em class='comment'> * no additional spaces are inserted</em>
<a id='L407' name='L407'></a> 407 <em class='comment'> * I</em>
<a id='L408' name='L408'></a> 408 <em class='comment'> */</em>
<a id='L409' name='L409'></a> 409 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L460' title='Defined at 460 in lib/strutil/strutil.c.'>str_term_trim</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L410' name='L410'></a> 410
<a id='L411' name='L411'></a> 411 <em class='comment'>/* like str_term_form, but return only specified substring</em>
<a id='L412' name='L412'></a> 412 <em class='comment'> * start - column (position) on terminal, where substring begin</em>
<a id='L413' name='L413'></a> 413 <em class='comment'> * result is completed with spaces to width</em>
<a id='L414' name='L414'></a> 414 <em class='comment'> * I</em>
<a id='L415' name='L415'></a> 415 <em class='comment'> */</em>
<a id='L416' name='L416'></a> 416 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L468' title='Defined at 468 in lib/strutil/strutil.c.'>str_term_substring</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>int</strong> <a href='../S/src--editor--etags.c.html#L199' title='Defined at 199 in src/editor/etags.c.'>start</a>, <strong class='reserved'>int</strong> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L417' name='L417'></a> 417
<a id='L418' name='L418'></a> 418 <em class='comment'>/* return width, that will be text occupied on terminal</em>
<a id='L419' name='L419'></a> 419 <em class='comment'> * I</em>
<a id='L420' name='L420'></a> 420 <em class='comment'> */</em>
<a id='L421' name='L421'></a> 421 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L653' title='Defined at 653 in lib/strutil/strutil.c.'>str_term_width1</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L422' name='L422'></a> 422
<a id='L423' name='L423'></a> 423 <em class='comment'>/* return width, that will be text occupied on terminal</em>
<a id='L424' name='L424'></a> 424 <em class='comment'> * text is limited by width in characters</em>
<a id='L425' name='L425'></a> 425 <em class='comment'> * I</em>
<a id='L426' name='L426'></a> 426 <em class='comment'> */</em>
<a id='L427' name='L427'></a> 427 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L665' title='Defined at 665 in lib/strutil/strutil.c.'>str_term_width2</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L428' name='L428'></a> 428
<a id='L429' name='L429'></a> 429 <em class='comment'>/* return width, that will be character occupied on terminal</em>
<a id='L430' name='L430'></a> 430 <em class='comment'> * combining characters are always zero width</em>
<a id='L431' name='L431'></a> 431 <em class='comment'> * I</em>
<a id='L432' name='L432'></a> 432 <em class='comment'> */</em>
<a id='L433' name='L433'></a> 433 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L675' title='Defined at 675 in lib/strutil/strutil.c.'>str_term_char_width</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L434' name='L434'></a> 434
<a id='L435' name='L435'></a> 435 <em class='comment'>/* convert position in characters to position in bytes</em>
<a id='L436' name='L436'></a> 436 <em class='comment'> * I</em>
<a id='L437' name='L437'></a> 437 <em class='comment'> */</em>
<a id='L438' name='L438'></a> 438 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L683' title='Defined at 683 in lib/strutil/strutil.c.'>str_offset_to_pos</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/length.html' title='Multiple used in 182 places.'>length</a>);
<a id='L439' name='L439'></a> 439
<a id='L440' name='L440'></a> 440 <em class='comment'>/* convert position on terminal to position in characters</em>
<a id='L441' name='L441'></a> 441 <em class='comment'> * I</em>
<a id='L442' name='L442'></a> 442 <em class='comment'> */</em>
<a id='L443' name='L443'></a> 443 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L723' title='Defined at 723 in lib/strutil/strutil.c.'>str_column_to_pos</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/pos.html' title='Multiple used in 315 places.'>pos</a>);
<a id='L444' name='L444'></a> 444
<a id='L445' name='L445'></a> 445 <em class='comment'>/* like str_fit_to_term width just_mode = J_LEFT_FIT,</em>
<a id='L446' name='L446'></a> 446 <em class='comment'> * but do not insert additional spaces</em>
<a id='L447' name='L447'></a> 447 <em class='comment'> * I</em>
<a id='L448' name='L448'></a> 448 <em class='comment'> */</em>
<a id='L449' name='L449'></a> 449 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L795' title='Defined at 795 in lib/strutil/strutil.c.'>str_trunc</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/width.html' title='Multiple used in 302 places.'>width</a>);
<a id='L450' name='L450'></a> 450
<a id='L451' name='L451'></a> 451 <em class='comment'>/* create needle, that will be searched in str_search_fist/last,</em>
<a id='L452' name='L452'></a> 452 <em class='comment'> * so needle can be reused</em>
<a id='L453' name='L453'></a> 453 <em class='comment'> * in UTF-8 return normalized form of needle</em>
<a id='L454' name='L454'></a> 454 <em class='comment'> */</em>
<a id='L455' name='L455'></a> 455 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L803' title='Defined at 803 in lib/strutil/strutil.c.'>str_create_search_needle</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L456' name='L456'></a> 456
<a id='L457' name='L457'></a> 457 <em class='comment'>/* free needle returned by str_create_search_needle</em>
<a id='L458' name='L458'></a> 458 <em class='comment'> */</em>
<a id='L459' name='L459'></a> 459 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L811' title='Defined at 811 in lib/strutil/strutil.c.'>str_release_search_needle</a> (<strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L460' name='L460'></a> 460
<a id='L461' name='L461'></a> 461 <em class='comment'>/* search for first occurrence of search in text</em>
<a id='L462' name='L462'></a> 462 <em class='comment'> */</em>
<a id='L463' name='L463'></a> 463 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L819' title='Defined at 819 in lib/strutil/strutil.c.'>str_search_first</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L464' name='L464'></a> 464
<a id='L465' name='L465'></a> 465 <em class='comment'>/* search for last occurrence of search in text</em>
<a id='L466' name='L466'></a> 466 <em class='comment'> */</em>
<a id='L467' name='L467'></a> 467 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L827' title='Defined at 827 in lib/strutil/strutil.c.'>str_search_last</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L468' name='L468'></a> 468
<a id='L469' name='L469'></a> 469 <em class='comment'>/* case sensitive compare two strings</em>
<a id='L470' name='L470'></a> 470 <em class='comment'> * I</em>
<a id='L471' name='L471'></a> 471 <em class='comment'> */</em>
<a id='L472' name='L472'></a> 472 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L843' title='Defined at 843 in lib/strutil/strutil.c.'>str_compare</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L473' name='L473'></a> 473
<a id='L474' name='L474'></a> 474 <em class='comment'>/* case sensitive compare two strings</em>
<a id='L475' name='L475'></a> 475 <em class='comment'> * if one string is prefix of the other string, return 0</em>
<a id='L476' name='L476'></a> 476 <em class='comment'> * I</em>
<a id='L477' name='L477'></a> 477 <em class='comment'> */</em>
<a id='L478' name='L478'></a> 478 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L851' title='Defined at 851 in lib/strutil/strutil.c.'>str_ncompare</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L479' name='L479'></a> 479
<a id='L480' name='L480'></a> 480 <em class='comment'>/* case insensitive compare two strings</em>
<a id='L481' name='L481'></a> 481 <em class='comment'> * I</em>
<a id='L482' name='L482'></a> 482 <em class='comment'> */</em>
<a id='L483' name='L483'></a> 483 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L859' title='Defined at 859 in lib/strutil/strutil.c.'>str_casecmp</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L484' name='L484'></a> 484
<a id='L485' name='L485'></a> 485 <em class='comment'>/* case insensitive compare two strings</em>
<a id='L486' name='L486'></a> 486 <em class='comment'> * if one string is prefix of the other string, return 0</em>
<a id='L487' name='L487'></a> 487 <em class='comment'> * I</em>
<a id='L488' name='L488'></a> 488 <em class='comment'> */</em>
<a id='L489' name='L489'></a> 489 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L867' title='Defined at 867 in lib/strutil/strutil.c.'>str_ncasecmp</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>);
<a id='L490' name='L490'></a> 490
<a id='L491' name='L491'></a> 491 <em class='comment'>/* return, how many bytes are are same from start in text and prefix</em>
<a id='L492' name='L492'></a> 492 <em class='comment'> * both strings are decomposed before comparing and return value is counted</em>
<a id='L493' name='L493'></a> 493 <em class='comment'> * in decomposed form, too. calling with prefix, prefix, you get size in bytes</em>
<a id='L494' name='L494'></a> 494 <em class='comment'> * of prefix in decomposed form,</em>
<a id='L495' name='L495'></a> 495 <em class='comment'> * I</em>
<a id='L496' name='L496'></a> 496 <em class='comment'> */</em>
<a id='L497' name='L497'></a> 497 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L875' title='Defined at 875 in lib/strutil/strutil.c.'>str_prefix</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/prefix.html' title='Multiple used in 85 places.'>prefix</a>);
<a id='L498' name='L498'></a> 498
<a id='L499' name='L499'></a> 499 <em class='comment'>/* case insensitive version of str_prefix</em>
<a id='L500' name='L500'></a> 500 <em class='comment'> * I</em>
<a id='L501' name='L501'></a> 501 <em class='comment'> */</em>
<a id='L502' name='L502'></a> 502 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L883' title='Defined at 883 in lib/strutil/strutil.c.'>str_caseprefix</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/prefix.html' title='Multiple used in 85 places.'>prefix</a>);
<a id='L503' name='L503'></a> 503
<a id='L504' name='L504'></a> 504 <em class='comment'>/* create a key that is used by str_key_collate</em>
<a id='L505' name='L505'></a> 505 <em class='comment'> * I</em>
<a id='L506' name='L506'></a> 506 <em class='comment'> */</em>
<a id='L507' name='L507'></a> 507 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L899' title='Defined at 899 in lib/strutil/strutil.c.'>str_create_key</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L508' name='L508'></a> 508
<a id='L509' name='L509'></a> 509 <em class='comment'>/* create a key that is used by str_key_collate</em>
<a id='L510' name='L510'></a> 510 <em class='comment'> * should aware dot '.' in text</em>
<a id='L511' name='L511'></a> 511 <em class='comment'> * I</em>
<a id='L512' name='L512'></a> 512 <em class='comment'> */</em>
<a id='L513' name='L513'></a> 513 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L907' title='Defined at 907 in lib/strutil/strutil.c.'>str_create_key_for_filename</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L514' name='L514'></a> 514
<a id='L515' name='L515'></a> 515 <em class='comment'>/* compare two string using LC_COLLATE, if is possible</em>
<a id='L516' name='L516'></a> 516 <em class='comment'> * if case_sen is set, comparing is case sensitive,</em>
<a id='L517' name='L517'></a> 517 <em class='comment'> * case_sen must be same for str_create_key, str_key_collate and str_release_key</em>
<a id='L518' name='L518'></a> 518 <em class='comment'> * I</em>
<a id='L519' name='L519'></a> 519 <em class='comment'> */</em>
<a id='L520' name='L520'></a> 520 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strutil.c.html#L915' title='Defined at 915 in lib/strutil/strutil.c.'>str_key_collate</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t1.html' title='Multiple used in 59 places.'>t1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/t2.html' title='Multiple used in 64 places.'>t2</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L521' name='L521'></a> 521
<a id='L522' name='L522'></a> 522 <em class='comment'>/* release_key created by str_create_key, only right way to release key</em>
<a id='L523' name='L523'></a> 523 <em class='comment'> * I</em>
<a id='L524' name='L524'></a> 524 <em class='comment'> */</em>
<a id='L525' name='L525'></a> 525 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L923' title='Defined at 923 in lib/strutil/strutil.c.'>str_release_key</a> (<strong class='reserved'>char</strong> *<a href='../Y/key.html' title='Multiple used in 190 places.'>key</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/case_sen.html' title='Multiple used in 86 places.'>case_sen</a>);
<a id='L526' name='L526'></a> 526
<a id='L527' name='L527'></a> 527 <em class='comment'>/* return TRUE if codeset_name is utf8 or utf-8</em>
<a id='L528' name='L528'></a> 528 <em class='comment'> * I</em>
<a id='L529' name='L529'></a> 529 <em class='comment'> */</em>
<a id='L530' name='L530'></a> 530 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strutil.c.html#L393' title='Defined at 393 in lib/strutil/strutil.c.'>str_isutf8</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/codeset_name.html' title='Multiple used in 3 places.'>codeset_name</a>);
<a id='L531' name='L531'></a> 531
<a id='L532' name='L532'></a> 532 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L376' title='Defined at 376 in lib/strutil/strutil.c.'>str_detect_termencoding</a> (<strong class='reserved'>void</strong>);
<a id='L533' name='L533'></a> 533
<a id='L534' name='L534'></a> 534 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--strverscmp.c.html#L83' title='Defined at 83 in lib/strutil/strverscmp.c.'>str_verscmp</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/s1.html' title='Multiple used in 50 places.'>s1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/s2.html' title='Multiple used in 48 places.'>s2</a>);
<a id='L535' name='L535'></a> 535
<a id='L536' name='L536'></a> 536 <em class='comment'>/* Like filevercmp, except compare the byte arrays a (of length alen) and b (of length blen)</em>
<a id='L537' name='L537'></a> 537 <em class='comment'> so that a and b can contain '\0', which sorts just before '\1'. But if alen is -1 treat</em>
<a id='L538' name='L538'></a> 538 <em class='comment'> a as a string terminated by '\0', and similarly for blen.</em>
<a id='L539' name='L539'></a> 539 <em class='comment'> */</em>
<a id='L540' name='L540'></a> 540 <strong class='reserved'>int</strong> <a href='../S/lib--strutil--filevercmp.c.html#L195' title='Defined at 195 in lib/strutil/filevercmp.c.'>filenvercmp</a> (<strong class='reserved'>char</strong> <strong class='reserved'>const</strong> *<a href='../Y/a.html' title='Multiple used in 466 places.'>a</a>, <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/alen.html' title='Multiple used in 15 places.'>alen</a>, <strong class='reserved'>char</strong> <strong class='reserved'>const</strong> *<a href='../Y/b.html' title='Multiple used in 653 places.'>b</a>, <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/blen.html' title='Multiple used in 36 places.'>blen</a>);
<a id='L541' name='L541'></a> 541
<a id='L542' name='L542'></a> 542 <em class='comment'>/* return how many lines and columns will text occupy on terminal</em>
<a id='L543' name='L543'></a> 543 <em class='comment'> */</em>
<a id='L544' name='L544'></a> 544 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L931' title='Defined at 931 in lib/strutil/strutil.c.'>str_msg_term_size</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>, <strong class='reserved'>int</strong> *<a href='../Y/lines.html' title='Multiple used in 377 places.'>lines</a>, <strong class='reserved'>int</strong> *<a href='../Y/columns.html' title='Multiple used in 46 places.'>columns</a>);
<a id='L545' name='L545'></a> 545
<a id='L546' name='L546'></a> 546 <em class='comment'>/**</em>
<a id='L547' name='L547'></a> 547 <em class='comment'> * skip first needle's in haystack</em>
<a id='L548' name='L548'></a> 548 <em class='comment'> *</em>
<a id='L549' name='L549'></a> 549 <em class='comment'> * @param haystack pointer to string</em>
<a id='L550' name='L550'></a> 550 <em class='comment'> * @param needle pointer to string</em>
<a id='L551' name='L551'></a> 551 <em class='comment'> * @param skip_count skip first bytes</em>
<a id='L552' name='L552'></a> 552 <em class='comment'> *</em>
<a id='L553' name='L553'></a> 553 <em class='comment'> * @return pointer to skip_count+1 needle (or NULL if not found).</em>
<a id='L554' name='L554'></a> 554 <em class='comment'> */</em>
<a id='L555' name='L555'></a> 555
<a id='L556' name='L556'></a> 556 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strutil.c.html#L972' title='Defined at 972 in lib/strutil/strutil.c.'>strrstr_skip_count</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/haystack.html' title='Multiple used in 27 places.'>haystack</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/skip_count.html' title='Multiple used in 6 places.'>skip_count</a>);
<a id='L557' name='L557'></a> 557
<a id='L558' name='L558'></a> 558 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--replace.c.html#L60' title='Defined at 60 in lib/strutil/replace.c.'>str_replace_all</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/haystack.html' title='Multiple used in 27 places.'>haystack</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/needle.html' title='Multiple used in 38 places.'>needle</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/replacement.html' title='Multiple used in 6 places.'>replacement</a>);
<a id='L559' name='L559'></a> 559
<a id='L560' name='L560'></a> 560 <a href='../Y/GPtrArray.html' title='Multiple used in 93 places.'>GPtrArray</a> *<a href='../S/lib--strutil--tokenize.c.html#L213' title='Defined at 213 in lib/strutil/tokenize.c.'>str_tokenize</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/string.html' title='Multiple used in 111 places.'>string</a>);
<a id='L561' name='L561'></a> 561
<a id='L562' name='L562'></a> 562 <a href='../S/lib--strutil.h.html#L99' title='Defined at 99 in lib/strutil.h.'>strtol_error_t</a> <a href='../S/lib--strutil--xstrtol.c.html#L93' title='Defined at 93 in lib/strutil/xstrtol.c.'>xstrtoumax</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/nptr.html' title='Multiple used in 7 places.'>nptr</a>, <strong class='reserved'>char</strong> **<a href='../Y/endptr.html' title='Multiple used in 3 places.'>endptr</a>, <strong class='reserved'>int</strong> <a href='../Y/base.html' title='Multiple used in 92 places.'>base</a>, <a href='../Y/uintmax_t.html' title='Multiple used in 111 places.'>uintmax_t</a> *<a href='../Y/val.html' title='Multiple used in 43 places.'>val</a>,
<a id='L563' name='L563'></a> 563 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/valid_suffixes.html' title='Multiple used in 6 places.'>valid_suffixes</a>);
<a id='L564' name='L564'></a> 564 <a href='../Y/uintmax_t.html' title='Multiple used in 111 places.'>uintmax_t</a> <a href='../S/lib--strutil--strutil.c.html#L1001' title='Defined at 1001 in lib/strutil/strutil.c.'>parse_integer</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/str.html' title='Multiple used in 654 places.'>str</a>, <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> *<a href='../Y/invalid.html' title='Multiple used in 9 places.'>invalid</a>);
<a id='L565' name='L565'></a> 565
<a id='L566' name='L566'></a> 566 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L55' title='Defined at 55 in lib/strutil/strescape.c.'>str_escape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/src.html' title='Multiple used in 112 places.'>src</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/src_len.html' title='Multiple used in 6 places.'>src_len</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/escaped_chars.html' title='Multiple used in 3 places.'>escaped_chars</a>,
<a id='L567' name='L567'></a> 567 <strong class='reserved'>const</strong> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/escape_non_printable.html' title='Multiple used in 3 places.'>escape_non_printable</a>);
<a id='L568' name='L568'></a> 568 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L105' title='Defined at 105 in lib/strutil/strescape.c.'>str_unescape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/src.html' title='Multiple used in 112 places.'>src</a>, <strong class='reserved'>const</strong> <a href='../Y/ssize_t.html' title='Multiple used in 180 places.'>ssize_t</a> <a href='../Y/src_len.html' title='Multiple used in 6 places.'>src_len</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/unescaped_chars.html' title='Multiple used in 4 places.'>unescaped_chars</a>,
<a id='L569' name='L569'></a> 569 <strong class='reserved'>const</strong> <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../Y/unescape_non_printable.html' title='Multiple used in 3 places.'>unescape_non_printable</a>);
<a id='L570' name='L570'></a> 570 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L215' title='Defined at 215 in lib/strutil/strescape.c.'>str_shell_unescape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L571' name='L571'></a> 571 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L182' title='Defined at 182 in lib/strutil/strescape.c.'>str_shell_escape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L572' name='L572'></a> 572
<a id='L573' name='L573'></a> 573 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L190' title='Defined at 190 in lib/strutil/strescape.c.'>str_glob_escape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L574' name='L574'></a> 574 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L223' title='Defined at 223 in lib/strutil/strescape.c.'>str_glob_unescape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L575' name='L575'></a> 575
<a id='L576' name='L576'></a> 576 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L198' title='Defined at 198 in lib/strutil/strescape.c.'>str_regex_escape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L577' name='L577'></a> 577 <strong class='reserved'>char</strong> *<a href='../S/lib--strutil--strescape.c.html#L230' title='Defined at 230 in lib/strutil/strescape.c.'>str_regex_unescape</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L578' name='L578'></a> 578
<a id='L579' name='L579'></a> 579 <a href='../Y/gboolean.html' title='Multiple used in 1942 places.'>gboolean</a> <a href='../S/lib--strutil--strescape.c.html#L247' title='Defined at 247 in lib/strutil/strescape.c.'>str_is_char_escaped</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/src--editor--etags.c.html#L199' title='Defined at 199 in src/editor/etags.c.'>start</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/current.html' title='Multiple used in 568 places.'>current</a>);
<a id='L580' name='L580'></a> 580
<a id='L581' name='L581'></a> 581 <strong class='reserved'>void</strong> <a href='../S/lib--strutil--strutil.c.html#L1036' title='Defined at 1036 in lib/strutil/strutil.c.'>str_rstrip_eol</a> (<strong class='reserved'>char</strong> *<a href='../Y/s.html' title='Multiple used in 822 places.'>s</a>);
<a id='L582' name='L582'></a> 582
<a id='L583' name='L583'></a> 583 <em class='comment'>/* --------------------------------------------------------------------------------------------- */</em>
<a id='L584' name='L584'></a> 584 <em class='comment'>/*** inline functions ****************************************************************************/</em>
<a id='L585' name='L585'></a> 585 <em class='comment'>/* --------------------------------------------------------------------------------------------- */</em>
<a id='L586' name='L586'></a> 586
<a id='L587' name='L587'></a> 587 <strong class='reserved'>static</strong> <strong class='reserved'>inline</strong> <strong class='reserved'>void</strong>
<a id='L588' name='L588'></a> 588 str_replace (<strong class='reserved'>char</strong> *<a href='../Y/s.html' title='Multiple used in 822 places.'>s</a>, <strong class='reserved'>char</strong> <a href='../Y/from.html' title='Multiple used in 54 places.'>from</a>, <strong class='reserved'>char</strong> <a href='../Y/to.html' title='Multiple used in 8 places.'>to</a>)
<a id='L589' name='L589'></a> 589 <em class='brace'>{</em>
<a id='L590' name='L590'></a> 590 <strong class='reserved'>for</strong> (; *<a href='../Y/s.html' title='Multiple used in 822 places.'>s</a> != '\0'; <a href='../Y/s.html' title='Multiple used in 822 places.'>s</a>++)
<a id='L591' name='L591'></a> 591 <em class='brace'>{</em>
<a id='L592' name='L592'></a> 592 <strong class='reserved'>if</strong> (*<a href='../Y/s.html' title='Multiple used in 822 places.'>s</a> == <a href='../Y/from.html' title='Multiple used in 54 places.'>from</a>)
<a id='L593' name='L593'></a> 593 *<a href='../Y/s.html' title='Multiple used in 822 places.'>s</a> = <a href='../Y/to.html' title='Multiple used in 8 places.'>to</a>;
<a id='L594' name='L594'></a> 594 <em class='brace'>}</em>
<a id='L595' name='L595'></a> 595 <em class='brace'>}</em>
<a id='L596' name='L596'></a> 596
<a id='L597' name='L597'></a> 597 <em class='comment'>/* --------------------------------------------------------------------------------------------- */</em>
<a id='L598' name='L598'></a> 598 <em class='comment'>/*</em>
<a id='L599' name='L599'></a> 599 <em class='comment'> * strcpy is unsafe on overlapping memory areas, so define memmove-alike</em>
<a id='L600' name='L600'></a> 600 <em class='comment'> * string function.</em>
<a id='L601' name='L601'></a> 601 <em class='comment'> * Have sense only when:</em>
<a id='L602' name='L602'></a> 602 <em class='comment'> * * dest &lt;= src</em>
<a id='L603' name='L603'></a> 603 <em class='comment'> * AND</em>
<a id='L604' name='L604'></a> 604 <em class='comment'> * * dest and str are pointers to one object (as Roland Illig pointed).</em>
<a id='L605' name='L605'></a> 605 <em class='comment'> *</em>
<a id='L606' name='L606'></a> 606 <em class='comment'> * We can't use str*cpy funs here.</em>
<a id='L607' name='L607'></a> 607 <em class='comment'> *</em>
<a id='L608' name='L608'></a> 608 <em class='comment'> * @param dest pointer to string</em>
<a id='L609' name='L609'></a> 609 <em class='comment'> * @param src pointer to string</em>
<a id='L610' name='L610'></a> 610 <em class='comment'> *</em>
<a id='L611' name='L611'></a> 611 <em class='comment'> * @return newly allocated string</em>
<a id='L612' name='L612'></a> 612 <em class='comment'> *</em>
<a id='L613' name='L613'></a> 613 <em class='comment'> */</em>
<a id='L614' name='L614'></a> 614
<a id='L615' name='L615'></a> 615 <strong class='reserved'>static</strong> <strong class='reserved'>inline</strong> <strong class='reserved'>char</strong> *
<a id='L616' name='L616'></a> 616 <a href='../R/str_move.html' title='Multiple referred from 9 places.'>str_move</a> (<strong class='reserved'>char</strong> *<a href='../Y/dest.html' title='Multiple used in 81 places.'>dest</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/src.html' title='Multiple used in 112 places.'>src</a>)
<em class='comment'>/* <a href='#L217'><img class='icon' src='../icons/left.png' alt='[previous]' /></a><a href='#L672'><img class='icon' src='../icons/right.png' alt='[next]' /></a><a href='#L217'><img class='icon' src='../icons/first.png' alt='[first]' /></a><a href='#L672'><img class='icon' src='../icons/last.png' alt='[last]' /></a><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+616 lib/strutil.h' /> */</em>
<a id='L617' name='L617'></a> 617 <em class='brace'>{</em>
<a id='L618' name='L618'></a> 618 <a href='../Y/size_t.html' title='Multiple used in 711 places.'>size_t</a> <a href='../Y/n.html' title='Multiple used in 251 places.'>n</a>;
<a id='L619' name='L619'></a> 619
<a id='L620' name='L620'></a> 620 <a href='../Y/g_assert.html' title='Multiple used in 32 places.'>g_assert</a> (<a href='../Y/dest.html' title='Multiple used in 81 places.'>dest</a> &lt;= <a href='../Y/src.html' title='Multiple used in 112 places.'>src</a>);
<a id='L621' name='L621'></a> 621
<a id='L622' name='L622'></a> 622 <a href='../Y/n.html' title='Multiple used in 251 places.'>n</a> = <a href='../Y/strlen.html' title='Multiple used in 193 places.'>strlen</a> (<a href='../Y/src.html' title='Multiple used in 112 places.'>src</a>) + 1; <em class='comment'>// + '\0'</em>
<a id='L623' name='L623'></a> 623
<a id='L624' name='L624'></a> 624 <strong class='reserved'>return</strong> (<strong class='reserved'>char</strong> *) <a href='../Y/memmove.html' title='Multiple used in 9 places.'>memmove</a> (<a href='../Y/dest.html' title='Multiple used in 81 places.'>dest</a>, <a href='../Y/src.html' title='Multiple used in 112 places.'>src</a>, <a href='../Y/n.html' title='Multiple used in 251 places.'>n</a>);
<a id='L625' name='L625'></a> 625 <em class='brace'>}</em>
<a id='L626' name='L626'></a> 626
<a id='L627' name='L627'></a> 627 <em class='comment'>/* --------------------------------------------------------------------------------------------- */</em>
<a id='L628' name='L628'></a> 628 <em class='comment'>/* Compare version strings:</em>
<a id='L629' name='L629'></a> 629 <em class='comment'></em>
<a id='L630' name='L630'></a> 630 <em class='comment'> Compare strings a and b as file names containing version numbers, and return an integer</em>
<a id='L631' name='L631'></a> 631 <em class='comment'> that is negative, zero, or positive depending on whether a compares less than, equal to,</em>
<a id='L632' name='L632'></a> 632 <em class='comment'> or greater than b.</em>
<a id='L633' name='L633'></a> 633 <em class='comment'></em>
<a id='L634' name='L634'></a> 634 <em class='comment'> Use the following version sort algorithm:</em>
<a id='L635' name='L635'></a> 635 <em class='comment'></em>
<a id='L636' name='L636'></a> 636 <em class='comment'> 1. Compare the strings' maximal-length non-digit prefixes lexically.</em>
<a id='L637' name='L637'></a> 637 <em class='comment'> If there is a difference return that difference.</em>
<a id='L638' name='L638'></a> 638 <em class='comment'> Otherwise discard the prefixes and continue with the next step.</em>
<a id='L639' name='L639'></a> 639 <em class='comment'></em>
<a id='L640' name='L640'></a> 640 <em class='comment'> 2. Compare the strings' maximal-length digit prefixes, using numeric comparison</em>
<a id='L641' name='L641'></a> 641 <em class='comment'> of the numbers represented by each prefix. (Treat an empty prefix as zero; this can</em>
<a id='L642' name='L642'></a> 642 <em class='comment'> happen only at string end.)</em>
<a id='L643' name='L643'></a> 643 <em class='comment'> If there is a difference, return that difference.</em>
<a id='L644' name='L644'></a> 644 <em class='comment'> Otherwise discard the prefixes and continue with the next step.</em>
<a id='L645' name='L645'></a> 645 <em class='comment'></em>
<a id='L646' name='L646'></a> 646 <em class='comment'> 3. If both strings are empty, return 0. Otherwise continue with step 1.</em>
<a id='L647' name='L647'></a> 647 <em class='comment'></em>
<a id='L648' name='L648'></a> 648 <em class='comment'> In version sort, lexical comparison is left to right, byte by byte, using the byte's numeric</em>
<a id='L649' name='L649'></a> 649 <em class='comment'> value (0-255), except that:</em>
<a id='L650' name='L650'></a> 650 <em class='comment'></em>
<a id='L651' name='L651'></a> 651 <em class='comment'> 1. ASCII letters sort before other bytes.</em>
<a id='L652' name='L652'></a> 652 <em class='comment'> 2. A tilde sorts before anything, even an empty string.</em>
<a id='L653' name='L653'></a> 653 <em class='comment'></em>
<a id='L654' name='L654'></a> 654 <em class='comment'> In addition to the version sort rules, the following strings have special priority and sort</em>
<a id='L655' name='L655'></a> 655 <em class='comment'> before all other strings (listed in order):</em>
<a id='L656' name='L656'></a> 656 <em class='comment'></em>
<a id='L657' name='L657'></a> 657 <em class='comment'> 1. The empty string.</em>
<a id='L658' name='L658'></a> 658 <em class='comment'> 2. ".".</em>
<a id='L659' name='L659'></a> 659 <em class='comment'> 3. "..".</em>
<a id='L660' name='L660'></a> 660 <em class='comment'> 4. Strings starting with "." sort before other strings.</em>
<a id='L661' name='L661'></a> 661 <em class='comment'></em>
<a id='L662' name='L662'></a> 662 <em class='comment'> Before comparing two strings where both begin with non-".", or where both begin with "."</em>
<a id='L663' name='L663'></a> 663 <em class='comment'> but neither is "." or "..", suffixes matching the C-locale extended regular expression</em>
<a id='L664' name='L664'></a> 664 <em class='comment'> (\.[A-Za-z~][A-Za-z0-9~]*)*$ are removed and the strings compared without them, using version</em>
<a id='L665' name='L665'></a> 665 <em class='comment'> sort without special priority; if they do not compare equal, this comparison result is used and</em>
<a id='L666' name='L666'></a> 666 <em class='comment'> the suffixes are effectively ignored. Otherwise, the entire strings are compared using version</em>
<a id='L667' name='L667'></a> 667 <em class='comment'> sort. When removing a suffix from a nonempty string, remove the maximal-length suffix such that</em>
<a id='L668' name='L668'></a> 668 <em class='comment'> the remaining string is nonempty.</em>
<a id='L669' name='L669'></a> 669 <em class='comment'> */</em>
<a id='L670' name='L670'></a> 670
<a id='L671' name='L671'></a> 671 <strong class='reserved'>static</strong> <strong class='reserved'>inline</strong> <strong class='reserved'>int</strong>
<a id='L672' name='L672'></a> 672 <a href='../R/filevercmp.html' title='Multiple referred from 5 places.'>filevercmp</a> (<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/s1.html' title='Multiple used in 50 places.'>s1</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/s2.html' title='Multiple used in 48 places.'>s2</a>)
<em class='comment'>/* <a href='#L616'><img class='icon' src='../icons/left.png' alt='[previous]' /></a><img class='icon' src='../icons/n_right.png' alt='[next]' /><a href='#L217'><img class='icon' src='../icons/first.png' alt='[first]' /></a><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+672 lib/strutil.h' /> */</em>
<a id='L673' name='L673'></a> 673 <em class='brace'>{</em>
<a id='L674' name='L674'></a> 674 <strong class='reserved'>return</strong> <a href='../S/lib--strutil--filevercmp.c.html#L195' title='Defined at 195 in lib/strutil/filevercmp.c.'>filenvercmp</a> (<a href='../Y/s1.html' title='Multiple used in 50 places.'>s1</a>, -1, <a href='../Y/s2.html' title='Multiple used in 48 places.'>s2</a>, -1);
<a id='L675' name='L675'></a> 675 <em class='brace'>}</em>
<a id='L676' name='L676'></a> 676
<a id='L677' name='L677'></a> 677 <em class='comment'>/* --------------------------------------------------------------------------------------------- */</em>
<a id='L678' name='L678'></a> 678
<a id='L679' name='L679'></a> 679 <em class='sharp'>#endif</em>
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><a href='#L217'><img class='icon' src='../icons/first.png' alt='[first]' /></a><a href='#L672'><img class='icon' src='../icons/last.png' alt='[last]' /></a><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+679 lib/strutil.h' /> */</em>
</body>
</html>