XsltFunctions.Contains(String, String) 方法

定义

按照 W3C 规范实现 contains XPath 函数。Implements contains XPath function according to the W3C specification.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static bool Contains(System::String ^ s1, System::String ^ s2);
public static bool Contains (string s1, string s2);
static member Contains : string * string -> bool
Public Shared Function Contains (s1 As String, s2 As String) As Boolean

参数

s1
String

要在其中查找 s2 的字符串。The string in which to locate s2.

s2
String

要在 s1 中查找的字符串。The string to locate in s1.

返回

Boolean

如果第一个参数字符串包含第二个参数字符串,则返回 true;否则返回 falsetrue if the first argument string contains the second argument string; otherwise, false.

适用于