StringExtensionsTruncate(String, Int32, String) Method
Truncates the input string given to the length specified and possibly adds an ellipsis at the end to mark a truncation
Namespace: PCBI_CadanceFab_ImportAssembly: PCBI_CadanceFab_Import (in PCBI_CadanceFab_Import.dll) Version: 16.0.0.0 (16.0.0.0)
public static string Truncate(
this string input,
int length,
string ellipsis
)
<ExtensionAttribute>
Public Shared Function Truncate (
input As String,
length As Integer,
ellipsis As String
) As String
public:
[ExtensionAttribute]
static String^ Truncate(
String^ input,
int length,
String^ ellipsis
)
[<ExtensionAttribute>]
static member Truncate :
input : string *
length : int *
ellipsis : string -> string
- input String
- The input string to truncate
- length Int32
- The desired maximum length of the resulting string
- ellipsis String
- An ellipsis to append to the end of a string when it gets truncated or null if no ellipsis is required
StringThe input string possibly truncated at the desired length with the ellipsis added. The length of the resulting string will never exceed the length specifiedIn Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).