麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 語言 > PHP > 正文

php strnatcmp()函數的用法總結

2024-09-04 11:49:53
字體:
來源:轉載
供稿:網友

這篇文章主要是對php中strnatcmp()函數的用法進行了詳細的總結介紹,需要的朋友可以過來參考下,希望對大家有所幫助。

Definition and Usage

定義和用法

The strnatcmp() function compares two strings using a "natural" algorithm.

strnatcmp()函數的作用是:用自然運算法則比較字符串(大小寫敏感)。

In a natural algorithm, the number 2 is less than the number 10. In computer sorting, 10 is less than 2, because the first number in "10" is less than 2.

在“自然運算法則”中,2比10小。在計算機序列當中,10比2小,因為“10”中的第一個數字是“1”,它小于2。

This function returns:

這個函數將返回下列值:

•0 - if the two strings are equal

0 – 如果字符串相等

•<0 - if string1 is less than string2

<0 – 如果string1小于string2

•>0 - if string1 is greater than string2

>0 – 如果string1大于string2

Syntax

語法:

strnatcmp(string1,string2)

Parameter參數

Description描述

string1

Required. Specifies the first string to compare

必要參數。指定參與比較的第一個字符串對象

string2

Required. Specifies the second string to compare

必要參數。指定參數比較的第二個字符串對象

Tips and Notes

注意點

Note: The strnatcmp() is case-sensitive.

注意:strnatcmp()函數是區分大小寫的。

Example

案例代碼如下:

  1. <?phpecho strnatcmp("2Hello world!","10Hello world!");echo "<br />";echo strnatcmp("10Hello world!","2Hello world!");?> 

The output of the code above will be:

上述代碼將輸出下面的結果:-1 1

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 有兽焉免费动画 | 日韩一级免费毛片 | 免费国产一区二区视频 | 污黄视频在线播放 | 久久成人免费网站 | 少妇一级淫片免费放播放 | 国产成人精品免费视频大全最热 | 九九热在线视频观看 | av在线看网站| 久久人| 特级无码毛片免费视频尤物 | 中文字幕网在线 | 鲁丝一区二区三区不属 | 欧美黄色一级生活片 | 久久久国产精品免费观看 | 逼片视频 | 成人三区四区 | 爱福利视频网 | 蜜桃网在线观看 | 精品久久久久久久久久久久久久 | 欧美色性| 男女污视频在线观看 | 在线小视频国产 | 美女又黄又www | 高清中文字幕在线 | 91av大片 | 91九色网| 国产精品99一区二区 | pornoⅹxxxxhd麻豆| 久久久久久久亚洲精品 | 一级黄片毛片免费看 | 亚洲va在线 | 久久久久久久久久久久久九 | 国产成人综合在线观看 | 成人短视频在线播放 | 色97色 | 88xx成人永久免费观看 | 看免费黄色大片 | 久久精品日本一区 | 欧美亚洲国产一区二区三区 | 在线观看中文字幕av |