返回指定的字符串,确保返回的字符串有效的如果一个代理项对的字符串的子字符串。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function SubstringSurrogateAware ( _
str As String, _
startIndex As Integer, _
length As Integer _
) As String
用法
Dim str As String
Dim startIndex As Integer
Dim length As Integer
Dim returnValue As String
returnValue = SPStringUtility.SubstringSurrogateAware(str, _
startIndex, length)
public static string SubstringSurrogateAware(
string str,
int startIndex,
int length
)
参数
str
类型:System.String要计算的字符串。
startIndex
类型:System.Int3232 位整数,它表示字符串的子字符串的起始索引位置。
length
类型:System.Int3232 位整数,它表示的子字符串中的字符数。
返回值
类型:System.String
子字符串。
备注
使用SubstringSurrogateAware方法拆分代理项对,确保返回的子字符串有效。