mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-17 21:16:57 +08:00
104 lines
3.8 KiB
HTML
104 lines
3.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>二进制安全比较字符串开头的若干个字符(不区分大小写)</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.strncasecmp" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">strncasecmp</h1>
|
||
<p class="verinfo">(PHP 4 >= 4.0.2, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">strncasecmp</span> — <span class="dc-title">二进制安全比较字符串开头的若干个字符(不区分大小写)</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.strncasecmp-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>strncasecmp</strong></span>
|
||
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$str1</code></span>
|
||
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$str2</code></span>
|
||
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$len</code></span>
|
||
) : <span class="type">int</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
该函数与 <span class="function"><a href="strcasecmp.html" class="function">strcasecmp()</a></span> 类似,不同之处在于你可以指定两个字符串比较时使用的长度(即最大比较长度)。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.strncasecmp-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<p class="para">
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">str1</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
第一个字符串。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">str2</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
第二个字符串。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">len</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
最大比较长度。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.strncasecmp-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
如果 <code class="parameter">str1</code> 小于
|
||
<code class="parameter">str2</code> 返回 < 0;
|
||
如果 <code class="parameter">str1</code>
|
||
大于 <code class="parameter">str2</code>
|
||
返回 > 0;如果两者相等,返回 0。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 seealso" id="refsect1-function.strncasecmp-seealso">
|
||
<h3 class="title">参见</h3>
|
||
<p class="para">
|
||
<ul class="simplelist">
|
||
<li class="member"><span class="function"><a href="strncmp.html" class="function" rel="rdfs-seeAlso">strncmp()</a> - 二进制安全比较字符串开头的若干个字符</span></li>
|
||
<li class="member"><span class="function"><a href="preg_match.html" class="function" rel="rdfs-seeAlso">preg_match()</a> - 执行匹配正则表达式</span></li>
|
||
<li class="member"><span class="function"><a href="substr_compare.html" class="function" rel="rdfs-seeAlso">substr_compare()</a> - 二进制安全比较字符串(从偏移位置比较指定长度)</span></li>
|
||
<li class="member"><span class="function"><a href="strcasecmp.html" class="function" rel="rdfs-seeAlso">strcasecmp()</a> - 二进制安全比较字符串(不区分大小写)</span></li>
|
||
<li class="member"><span class="function"><a href="stristr.html" class="function" rel="rdfs-seeAlso">stristr()</a> - strstr 函数的忽略大小写版本</span></li>
|
||
<li class="member"><span class="function"><a href="substr.html" class="function" rel="rdfs-seeAlso">substr()</a> - 返回字符串的子串</span></li>
|
||
</ul>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
</div></div></div></body></html> |