Skip to content

文字列系関数の提案 #640

@salano-ym

Description

@salano-ym

端の検索

端の削除

  • str.remove_prefix(prefix: str): str
    先頭がprefixなら削除
  • str.remove_suffix(suffix: str): str
    末尾がsuffixなら削除

幅埋め

  • str.pad_start(width: num, c: str = ' '): str
    長さがwidthになるようにcを先頭に追加
    str.pad_end(width: num, c: str = ' '): str
    長さがwidthになるようにcを末尾に追加
    str.pad_startとstr.pad_endを追加 #653

インデント

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions