package binsec
Install
dune-project
Dependency
Authors
-
AAdel Djoudi
-
BBenoit Boero
-
BBenjamin Farinier
-
CChakib Foulani
-
DDorian Lesbre
-
FFrédéric Recoules
-
GGuillaume Girol
-
JJosselin Feist
-
LLesly-Ann Daniel
-
MMahmudul Faisal Al Ameen
-
MManh-Dung Nguyen
-
MMathéo Vergnolle
-
MMatthieu Lemerre
-
NNicolas Bellec
-
OOlivier Nicole
-
RRichard Bonichon
-
RRobin David
-
SSébastien Bardin
-
SSoline Ducousso
-
TTa Thanh Dinh
-
YYaëlle Vinçont
-
YYanis Sellami
Maintainers
Sources
sha256=bb48234a4b60a872015a88282df4873f01dcc984753d49ad2583d49c1ae7d705
sha512=e8aa47a736b83bfd47d5b5e96d0988859b4873ad4a112fee7cd21d02bc72ecec61b7de610a959e38d2f2f5eef8082a2c100c201e5eae5ae3a880c747dce6ae63
doc/binsec.base/Binsec_base/String_utils/index.html
Module Binsec_base.String_utilsSource
Extra functions over strings
replace_chars f s creates a new string where all characters c from s have been replaced by the result of f c
reverse s creates a new reversed version of s
filter p s creates a copy of s containing the characters of s such that p c = true,
lfindi s p retrieves the first index of a character verifying predicate p. None otherwise
remove_char c s creates a copy of s without any occurrence of c
remove_newline s creates a copy of s without the newline character '\n'
lchop n s removes the first n characters of string s. Does nothing if the s is empty. Returns the empty string if n >= String.length s n must be positive.
left n s returns the n leftmost characters of s. n must be positive and smaller than the length of s.
right n s returns the n rightmost characters of s. n must be positive and smaller than the length of s.
size_of_hexstring s computes the size in bits of hexadecimal string s. Unsafe function: it does not fully check that s is a valid hexstring.
contains ~pattern s return true if pattern is a substring of s
Character functions
is_char_printable c returns true if c is a terminal-printable ASCII character
is_hex_char c returns true if c is a character representing a hex number, i.e., 'a'-'z', 'A'-'Z', '0'-'9'.
to_hex s return the hexadecimal representation of stored bytes
pp_hex s print the hexadecimal representation of stored bytes