Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

str.pad_startとstr.pad_endを追加 #653

Merged
merged 3 commits into from
May 12, 2024

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 uzmoi and FineArchs May 9, 2024 18:50
@salano-ym salano-ym merged commit 2dcb3fe into aiscript-dev:master May 12, 2024
4 checks passed
@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