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

lib/tests: Add features to pad, pad_left and pad_right to String #2609

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

fridis
Copy link
Member

@fridis fridis commented Feb 23, 2024

These are counterparts to trim that make it easier to create tabular output as in

  for i in -10..10 do
    say "{($i).pad_left 4}² = {($(i**2)).pad_left 4}."

Also added a simple test for these features.

These are counterparts to `trim` that make it easier to create tabular output as
in

  for i in -10..10 do
    say "{($i).pad_left 4}² = {($(i**2)).pad_left 4}."

Also added a simple test for these features.
lib/String.fz Outdated Show resolved Hide resolved
lib/String.fz Show resolved Hide resolved
lib/String.fz Show resolved Hide resolved
@maxteufel maxteufel merged commit 1af0970 into main Feb 28, 2024
5 checks passed
@maxteufel maxteufel deleted the string_pad branch February 28, 2024 12:53
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.

None yet

3 participants