package rpclib
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A library to deal with RPCs in OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
rpclib-10.0.0.tbz
sha256=1d62cf36ff3f599286ff6c77a3266b04d9e14df73d3fce078d51ab9c4c7bad3a
sha512=9fe0bc38363c35e5ec185eadc096565f7f76e219bfde62756dee2cbc818e7663e1ce2e730a235f2bf2230a24ff52b29bcc8e1082e0a43d7e6c23f56ad74add43
doc/src/rpclib.internals/internals.ml.html
Source file internals.ml
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 28(** Encodes a string using the given translation function that maps a character to a string that is its encoded version, if that character needs encoding. *) let encode translate s = let n = String.length s in let need_encoding = let b = ref false in let i = ref 0 in while (not !b) && !i < n do b := translate s.[!i] <> None; incr i done; !b in if need_encoding then ( let buf = Buffer.create 0 in let m = ref 0 in for i = 0 to n - 1 do match translate s.[i] with | None -> () | Some n -> Buffer.add_substring buf s !m (i - !m); Buffer.add_string buf n; m := i + 1 done; Buffer.add_substring buf s !m (n - !m); Buffer.contents buf) else s
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>