StringType.StrCmp(String, String, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
比較兩個字串。
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。
public:
static int StrCmp(System::String ^ sLeft, System::String ^ sRight, bool TextCompare);
public static int StrCmp (string? sLeft, string? sRight, bool TextCompare);
public static int StrCmp (string sLeft, string sRight, bool TextCompare);
static member StrCmp : string * string * bool -> int
Public Shared Function StrCmp (sLeft As String, sRight As String, TextCompare As Boolean) As Integer
Public Function StrCmp (sLeft As String, sRight As String, TextCompare As Boolean) As Integer
參數
- sLeft
- String
必要。 要與 sRight
比較的字串。
- sRight
- String
必要。 要與 sLeft
比較的字串。
- TextCompare
- Boolean
必要。 True
表示要執行不區分大小寫的比較,否則為 False
。
傳回
值 | 條件 |
---|---|
零 | 兩個字串相等。 |
小於零 |
sLeft 小於 sRight 。
|
大於零 |
sLeft 大於 sRight 。
|
備註
這個類別支援 Visual Basic 編譯程式,不適合直接從程式代碼使用。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應