Allow the index of CHARVAL to be optional

Fixes #1773
This commit is contained in:
Rangi42
2025-08-03 08:44:06 -04:00
parent 543b7fa6c2
commit fc9b614225
6 changed files with 33 additions and 7 deletions

View File

@@ -615,7 +615,7 @@ The following functions operate on string expressions, but return integers.
.It Fn CHARLEN str Ta Returns the number of charmap entries in Ar str No with the current charmap.
.It Fn CHARCMP str1 str2 Ta Compares Ar str1 No and Ar str2 No according to their charmap entry values with the current charmap. Returns -1 if Ar str1 No is lower than Ar str2 Ns , 1 if Ar str1 No is greater than Ar str2 Ns , or 0 if they match.
.It Fn CHARSIZE char Ta Returns how many values are in the charmap entry for Ar char No with the current charmap.
.It Fn CHARVAL char idx Ta Returns the value at Ar idx No of the charmap entry for Ar char .
.It Fn CHARVAL char idx Ta Returns the value at Ar idx No of the charmap entry for Ar char . If Ar idx No is not specified, Ar char No must have a single value, which is returned.
.El
.Pp
Note that indexes count starting from 0 at the beginning, or from -1 at the end.