Partager via


Uniquifier.Truncate Method

Definition

Overloads

Truncate(String, Int32, Nullable<Int32>)

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

Truncate(String, Int32, String, Nullable<Int32>)

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

Truncate(String, Int32, Nullable<Int32>)

Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs

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

Truncate(String, Int32, String, Nullable<Int32>)

Source:
Uniquifier.cs

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

Parameters

identifier
String

The identifier to shorten.

maxLength
Int32

The maximum length of the identifier.

suffix
String

An optional suffix to add after the uniquifier.

uniquifier
Nullable<Int32>

An optional number that will be appended to the identifier.

Returns

The shortened identifier.

Applies to