Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
stringify.cpp
Go to the documentation of this file.
1
#include "
barretenberg/vm2/common/stringify.hpp
"
2
3
namespace
bb::avm2
{
4
5
std::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
bb::avm2
Definition
flavor.hpp:472
bb::avm2::field_to_string
std::string field_to_string(const FF &ff)
Definition
stringify.cpp:5
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
stringify.hpp
src
barretenberg
vm2
common
stringify.cpp
Generated by
1.9.8