within

From The K Language Wiki
Revision as of 12:34, 11 August 2021 by Razetime (talk | contribs) (add within primtive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Within
i within a

The within primitive checks if an integer/character i is in the range defined by a two element vector a.

Like all K ranges, the range is inclusive of first element and exclusive of the second element.

 1 within 1 3
1
 3 within 1 3
0
 "a" within "az"
1
 "a" within "cz"
0