Fla$her wrote: 2026-01-20, 02:41 UTC
Considering
my suggestion, I propose to expand the capabilities:
%A
n+, %S
n+, %R
n+ — parameters starting from
n.
%A
n+
m, %S
n+
m, %R
n+
m — parameters from
n to
m.
%A
n-, %S
n-, %R
n- — the last
n parameters.
May be extend by using open/close characters like in the Unix shell?
String slice:
%A:~
n, %A:~
n,m, %A:~
n,-m, %A:~
-n — stringize %A and then slice a substring.
%A1:~
n, %A1:~
n,m, %A1:~
n,-m, %A1:~
-n — stringize %A1 and then slice a substring.
Array slice:
%{A[
n:]}, %{A[
n:m]}, %{A[
n:-m]}, %{A[
:n]}, %{A[
:-n]} — slice an array.
This will prevent misuse, when the followed character does not actually start a range selection sequence.
%{A}:.., %{A1}:.. - %A expanded as is without slicing.
%A[
n:], %A[
n:m], %A[
n:-m], %A[
:n], %A[
:-n], %A[... — %A expanded as %A without slicing.
%%A, %%{ - raw strings.