SqlFunctions.PatIndex(String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回指定之運算式中的模式,在所有有效文字和字元資料類型中第一次出現的起始位置,如果找不到模式,便傳回零。
[System.Data.Entity.DbFunction("SqlServer", "PATINDEX")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="stringPattern")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="target")]
public static Nullable<int> PatIndex(string stringPattern, string target);
static member PatIndex : string * string -> Nullable<int>
Public Shared Function PatIndex (stringPattern As String, target As String) As Nullable(Of Integer)
參數
- stringPattern
- String
要搜尋的字串模式。
- target
- String
要搜尋的字串。
傳回
找到字串模式的起始字元位置。
- 屬性