Fit a string into a given length, truncating or padding as necessary.
Namespace: CleanCode.DataAssembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
public static string FitString(
string value,
int fitLength
)
Public Shared Function FitString ( _
value As String, _
fitLength As Integer _
) As String
public:
static String^ FitString(
String^ value,
int fitLength
)
Return Value
String truncated or padded to fit the given length.
This operates the same as
PadRight(String, Int32)
as long as the initial value is not longer than the
fitLength.