Table of Contents

Method BoundedString

Namespace
WhalesSecret.TradeScriptLib.Logging
Assembly
WhalesSecret.TradeScriptLib.dll

BoundedString(string?, int, bool)

Extension of string class to return at most maxLength characters of the string for formatting purposes.

public static string BoundedString(this string? s, int maxLength = 1024, bool useEllipses = true)

Parameters

s string

String instance.

maxLength int

Maximum acceptable length of a result. DefaultBoundedStringMaxLength by default.

useEllipses bool

true to add ellipses at the end of the string is shortened, false otherwise.

Returns

string

String instance itself or a new string instance that is maxLength characters long.