Description Usage Arguments Value Author(s)
This function will return an adapted version of the input string and will guarantee a certain maximum length. If the string is shortened, it will end with the default symbols ".." or a used defined ending. Additionally, the user can define a certain number of characters that need to included from the end of the original string (useful if the input strings contain salient ending characters, such as numbers).
1 | MetStaT.TrimCustom(text, max.length = 5, trim.ending = "..", include.ending.length = 0)
|
text |
the string which needs to be shortened. |
max.length |
the guaranteed maximum length that the resulting string may have. |
trim.ending |
the symbols to used when the string is shortened. |
include.ending.length |
the number of ending characters which must also be included in the resulting string. |
A shortened version of the input string.
Tim Dorscheidt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.