package spotlib
Module Spotlib.Xbytes
Construction
Deconstruction
Array
replace_chars c1 c2 s returns a copy of s with replacing all the char occurrences of c1 by c2.
Transform
chop_eols s returns the bytes s w/o the end-of-line chars. chop from Perl. chop_eols "hello\r\n" = "hello" chop_eols "hello\n" = "hello" chop_eols "hello\r" = "hello" chop_eols "hello" = "hello"
Sub
Same as Bytes.sub but even if the bytes shorter for len the function succeeds and returns a shorter subbytes.
Split
lines "hello\nworld\r\ngood\rday" = ["hello", "\n"; "world", "\r\n"; "good", "\r"; "day", ""]
split (function ' ' -> true | _ -> false) "hello world" = ["hello"; "world"]
Same as split but do the split only once
Split a bytes into "words" by white characters ' ', '\t', '\r' and '\n'
Random
Misc
Pervasives
module Pervasives : sig ... endSet