Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
stringify.cpp
Go to the documentation of this file.
2
3namespace bb::avm2 {
4
5std::string field_to_string(const FF& ff)
6{
7 std::ostringstream os;
8 os << ff;
9 std::string raw = os.str();
10 auto first_not_zero = raw.find_first_not_of('0', 2);
11 std::string result = "0x" + (first_not_zero != std::string::npos ? raw.substr(first_not_zero) : "0");
12 return result;
13}
14
15} // namespace bb::avm2
std::string field_to_string(const FF &ff)
Definition stringify.cpp:5
AvmFlavorSettings::FF FF
Definition field.hpp:10