File: http.bit.md

package info (click to toggle)
lua-http 0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,100 kB
  • sloc: makefile: 60; sh: 16
file content (27 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## http.bit

An abstraction layer over the various lua bit libraries.

Results are only consistent between underlying implementations when parameters and results are in the range of `0` to `0x7fffffff`.

### `band(a, b)` <!-- --> {#http.bit.band}

Bitwise And operation.


### `bor(a, b)` <!-- --> {#http.bit.bor}

Bitwise Or operation.


### `bxor(a, b)` <!-- --> {#http.bit.bxor}

Bitwise XOr operation.


### Example {#http.bit-example}

```lua
local bit = require "http.bit"
print(bit.band(1, 3)) --> 1
```