共用方式為


SPMobileUtility.GetEllipsisString method (String, Int32)

傳回指定的字串到指定長度的截斷的版與省略符號字元附加或整個字串,如果它不會超過指定的長度。

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function GetEllipsisString ( _
    source As String, _
    length As Integer _
) As String
'用途
Dim source As String
Dim length As Integer
Dim returnValue As String

returnValue = SPMobileUtility.GetEllipsisString(source, _
    length)
public static string GetEllipsisString(
    string source,
    int length
)

參數

  • length
    Type: System.Int32

    32 位元整數,表示要傳回的字元數目上限。

傳回值

Type: System.String
截斷後的字串或如果它不會超過指定的長度的整個字串。

請參閱

參照

SPMobileUtility class

SPMobileUtility members

GetEllipsisString overload

Microsoft.SharePoint.Utilities namespace