strtrunc
STRTRUNC Truncate strings to at most N characters (Octave name). T = STRTRUNC(S, N) cuts each row of char S (or each cell of a cellstr) to at most N columns. MATLAB portable path is indexing / extractBefore. Unmarked MATLAB-mode scripts that never call this name are unaffected. See also CHAR, EXTRACTBEFORE.