Skip to content

Conversation

@salano-ym
Copy link
Member

@salano-ym salano-ym commented May 9, 2024

What

str.pad_startstr.pad_endを追加

  • str.pad_start(width: num, pad?: str): str
  • str.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

#640

Additional info (optional)

@salano-ym salano-ym mentioned this pull request May 9, 2024
6 tasks
@salano-ym salano-ym requested review from FineArchs and uzmoi May 9, 2024 18:50
@salano-ym salano-ym merged commit 2dcb3fe into aiscript-dev:master May 12, 2024
@salano-ym salano-ym deleted the str-padstart-padend branch May 13, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants