strtrunc
Truncate a string to a specified length.
Syntax
Section titled “Syntax”s = strtrunc(str, n)Description
Section titled “Description”Returns the first n characters of str. If str has fewer than n characters, the original is returned unchanged.
Example
Section titled “Example”strtrunc('hello world', 5) % 'hello'