Share via


Uniquifier.Truncate(String, Int32, Nullable<Int32>) Method

Definition

Ensures the given identifier is shorter than the given length by removing the extra characters from the end.

public static string Truncate (string identifier, int maxLength, int? uniquifier = default);
static member Truncate : string * int * Nullable<int> -> string
Public Shared Function Truncate (identifier As String, maxLength As Integer, Optional uniquifier As Nullable(Of Integer) = Nothing) As String

Parameters

identifier
String

The identifier to shorten.

maxLength
Int32

The maximum length of the identifier.

uniquifier
Nullable<Int32>

An optional number that will be appended to the identifier.

Returns

The shortened identifier.

Applies to