strtruncr

Purpose

Truncates the right side of all elements of a string array by a user-specified number of characters.

Format

y = strtruncr(sa, ntrunc)
Parameters:
  • sa (NxM or Nx1, 1xM, or 1x1 string array.) – data

  • ntrunc (NxM or Nx1, 1xM, or 1x1 matrix) – the number of characters to strip.

Returns:

y (string array) – contains contents of sa with the ntrunc characters stripped from the right side.

Source

strfns.src