str.pad_startとstr.pad_endを追加 by salano-ym · Pull Request #653 · aiscript-dev/aiscript
Conversation
What
str.pad_startとstr.pad_endを追加
str.pad_start(width: num, pad?: str): strstr.pad_end(width: num, pad?: str): str
| ### @(_v_: str).pad_start(_width_: num, _pad_?: str): str | |
| 文字列の長さがが _width_ になるように、先頭を _pad_ の繰り返しで埋めた新しい文字列を返します。\ | |
| _pad_ を省略した場合、空白`' '`で埋められます。\ | |
| _pad_ が長すぎる場合、_pad_ の末尾が切り捨てられます。 | |
| ### @(_v_: str).pad_end(_width_: num, _pad_?: str): str | |
| 文字列の長さがが _width_ になるように、末尾を _pad_ の繰り返しで埋めた新しい文字列を返します。\ | |
| _pad_ を省略した場合、空白`' '`で埋められます。\ | |
| _pad_ が長すぎる場合、_pad_ の末尾が切り捨てられます。 |
Why
Additional info (optional)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters