다음을 통해 공유


SPStringUtility.SubstringSurrogateAware Method

Returns a substring of the specified string, ensuring that the returned string is valid if the string is a surrogate pair.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Function SubstringSurrogateAware ( _
    str As String, _
    startIndex As Integer, _
    length As Integer _
) As String
'Usage
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
)

Parameters

  • startIndex
    Type: System.Int32

    A 32-bit integer representing the index position of the start of the substring.

  • length
    Type: System.Int32

    A 32-bit integer representing the number of characters in the substring.

Return Value

Type: System.String
The substring.

Remarks

Use the SubstringSurrogateAware method to split a surrogate pair and ensure that the returned substring is valid.

See Also

Reference

SPStringUtility Class

SPStringUtility Members

Microsoft.SharePoint.Utilities Namespace