Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.68 KB

File metadata and controls

50 lines (30 loc) · 1.68 KB

ITruncator Interface

Can truncate a string.

public interface ITruncator

Derived
DynamicNumberOfCharactersAndPreserveWordsTruncator

Methods

ITruncator.Truncate(string, int, string, TruncateFrom) Method

Truncate a string

string? Truncate(string? value, int length, string? truncationString, Humanizer.TruncateFrom truncateFrom=Humanizer.TruncateFrom.Right);

Parameters

value System.String

The string to truncate

length System.Int32

The length to truncate to

truncationString System.String

The string used to truncate with

truncateFrom TruncateFrom

The enum value used to determine from where to truncate the string

Returns

System.String
The truncated string