File: README.md

package info (click to toggle)
ocaml-hex 1.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 124 kB
  • sloc: ml: 237; makefile: 16
file content (15 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### ocaml-hex -- a minimal library providing hexadecimal converters

[![Build Status](https://travis-ci.org/mirage/ocaml-hex.svg)](https://travis-ci.org/mirage/ocaml-hex)
[![docs](https://img.shields.io/badge/doc-online-blue.svg)](http://docs.mirage.io/hex/)

```ocaml
# #require "hex";;
# Hex.of_string "Hello world!";;
- : Hex.t = `Hex "48656c6c6f20776f726c6421"
# Hex.to_string (`Hex "deadbeef");;
- : string = "ޭ"
# Hex.hexdump (Hex.of_string "Hello world!\n")
00000000: 4865 6c6c 6f20 776f 726c 6421 0a         Hello world!.
- : unit = ()
```