ord multimethod

Methods

ord(s:Str, idx:Int)
Get character (byte) ordinal value. Throws InvalidArgument if idx is not pointing into s.

Parameters

idxIndex of the character to get value of

Returns

Int

Example

ord("A", 0)  # 65 on my machine
ord(s:Str) Source: stdlib.ngs:4647
Get character (currently byte) code. Throws InvalidArgument if s is not of length 1.

Example

ord("A")  # 65 on my machine