CommonExtensionMethods.EnsureEndsWith(String, Char) Method

Definition

Appends the specified character, if not already there

public static string EnsureEndsWith (this string value, char suffix);
static member EnsureEndsWith : string * char -> string
<Extension()>
Public Function EnsureEndsWith (value As String, suffix As Char) As String

Parameters

value
String

The string value to update

suffix
Char

The desired suffix

Returns

The fixed up string

Applies to