strpad

Add leading or trailing characters to character vector or cell array of character vectors in a single line of code.

Ahora está siguiendo esta publicación

In newer version (R2016b), it is easy to add leading or trailing characters to strings in a single line of code.
Just call the built-in function 'pad'.

So, I created this function for users with older version.
This function follows the same behaviour as the builtin.
Futhermore, the padding character, "padChar", is no need to be exactly single character.

Citar como

wfH (2026). strpad (https://la.mathworks.com/matlabcentral/fileexchange/71674-strpad), MATLAB Central File Exchange. Recuperado .

Agradecimientos

Inspirado por: String Support API, STRPAD String Pad for Matlab

Categorías

Más información sobre Characters and Strings en Help Center y MATLAB Answers.

Información general

Compatibilidad con la versión de MATLAB

  • Compatible con cualquier versión

Compatibilidad con las plataformas

  • Windows
  • macOS
  • Linux
Versión Publicado Notas de la versión Action
1.1.0

Fix bugs when "padChar" is not a single character.
Add compatibility to string array.
Revise H1 line section.

1.0.0