strpad
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.
Zitieren als
wfH (2024). strpad (https://www.mathworks.com/matlabcentral/fileexchange/71674-strpad), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Quellenangaben
Inspiriert von: 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!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.1.0 | Fix bugs when "padChar" is not a single character.
|
||
1.0.0 |