strpad

版本 1.1.0 (2.9 KB) 作者: wfH
Add leading or trailing characters to character vector or cell array of character vectors in a single line of code.
28.0 次下载
更新时间 2020/4/19

查看许可证

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.

引用格式

wfH (2024). strpad (https://www.mathworks.com/matlabcentral/fileexchange/71674-strpad), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2018a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1.0

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

1.0.0