Show / Hide Table of Contents

Method print.util.toString(+ 2 overloads)


Overload

Converts value of any type to string. Formats it like print.it.

public static string toString(object value, bool compact = false)
Parameters
value  (object)

Value of any type. If null, returns "null".

compact  (bool)

If value is IEnumerable, format it like "{ item1, item2 }".

Returns
string

Overload(next)

Appends value of any type to StringBuilder. Formats it like print.it.

public static void toString(StringBuilder b, object value, bool compact)
Parameters
b  (StringBuilder)
value  (object)

Value of any type. If null, returns "null".

compact  (bool)

If value is IEnumerable, format it like "{ item1, item2 }".


Overload(top)

Converts binary data to a hexadecimal + characters string, similar to the format used in hex editors.

public static string toString(ReadOnlySpan<byte> data, int columns)
Parameters
data  (ReadOnlySpan<byte>)
columns  (int)

The number of bytes in a row.

Returns
string