string: accept --char alias for pad and shorten

Closes #12460
This commit is contained in:
Aditya Giri
2026-02-17 20:32:08 +05:30
committed by Johannes Altmanninger
parent 1b0fa8f804
commit 149fec8f02
3 changed files with 6 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ string pad foo
string pad -C foo
# CHECK: foo
string pad -r -w 7 --chars - foo
string pad -r -w 7 --char - foo
# CHECK: foo----
string pad -r -w 7 --chars - --center foo
# CHECK: --foo--
@@ -1003,7 +1003,7 @@ string shorten --max 4 -c /// foobar
string shorten --max 4 -c /// foobarnana
# CHECK: f///
string shorten --max 2 --chars "" foo
string shorten --max 2 --char "" foo
# CHECK: fo
string shorten foo foobar