Helper function to shorten long strings when printing to logs.
If the input string exceeds max characters, it is truncated and
suffixed with "... (truncated)".
Usage
whapi_trunc(x, max = 2000L)
Value
A character string, possibly truncated.
Arguments
x
A character string (or coercible to character).
max
Integer. Maximum number of characters to display (default: 2000).