Home  Contents

magstripe.bits

Magstripe Core4 Lua Event System

SYNOPSIS

result = magstripe.bits(s [, width [, firstwidth]])

DESCRIPTION

Helper function to visualize the raw bits of magstripe data. The function converts the binary contents of s into a printable string of '0's and '1's. Optionally, it can insert a space every width digits. The final parameter will make the first inserted space appear after firstwidth digits.

RETURN VALUE

A printable string.

NOTES

This is useful for debugging applications that work on magstripe data.