Module bytes

Procs

proc byteArray*(data: string; size: static[int]): array[size, byte]
Converts a string to a bytearray.   Source Edit
proc toBinaryString*[T: array](s: T): string
Converts an array of bytes to a string.   Source Edit
proc setAt*(s: var string; at: int; data: string)
Put data at position at of string s.   Source Edit
proc pack*[T](v: T; endian: Endianness): string {.
inline
.}
Converts scalar v into a binary string with specific endianness.   Source Edit
proc unpack*[T](v: string; t: typedesc[T]; endian: Endianness): T {.
inline
.}
Converts binary string to scalar type t with specific endianness.   Source Edit
proc packStruct*[T](t: T): string {.
inline
.}
Dumps t to a string (in a same format as it is stores in memory)   Source Edit
proc unpackStruct*[T](v: string; t: typedesc[T]): T {.
inline
.}
Loads t from a string (simple by copying as casting v to it). Unsafe.   Source Edit
proc encodeHex*(s: string): string
  Source Edit
proc decodeHex*(s: string): string
  Source Edit
proc urlsafeBase64Encode*(s: string): string
  Source Edit
proc urlsafeBase64Decode*(s: string): string
  Source Edit