strpad

バージョン 1.1.0 (2.93 KB) 作成者: wfH
Add leading or trailing characters to character vector or cell array of character vectors in a single line of code.
ダウンロード: 28
更新 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 Center および MATLAB AnswersCharacters and Strings についてさらに検索
タグ タグを追加
謝辞

ヒントを得たファイル: String Support API, STRPAD String Pad for Matlab

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