github.com/hirochachacha/plua@v0.0.0-20170217012138-c82f520cc725/stdlib/string/testdata/byte.lua (about)

     1  assert(string.byte("a") == 97)
     2  
     3  a, b, c = string.byte("abcdefghi", 1, 3)
     4  
     5  assert(a == 97 and b == 98 and c == 99)
     6  
     7  h, i = string.byte("abcdefghi", -2, -1)
     8  
     9  assert(h == 104 and i == 105)