Truncate the string to the specified maximum length, appending ellipsis if truncated.
Example:
assert (Strings.truncate ("Hello World", 8, "...") == "Hello...");
| s |
the string. |
| maxLen |
maximum length of result including ellipsis. |
| ellipsis |
the ellipsis string to append. |
|
truncated string. |