Fabcoin Core  0.16.2
P2P Digital Currency
Namespaces | Functions
CommonJS.cpp File Reference
#include "CommonJS.h"
Include dependency graph for CommonJS.cpp:

Go to the source code of this file.

Namespaces

 dev
 Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Originally by RenĂ© Nyffenegger.
 

Functions

bytes dev::jsToBytes (string const &_s, OnFailed _f)
 
bytes dev::padded (bytes _b, unsigned _l)
 Add '0' on, or remove items from, the front of _b until it is of length _l. More...
 
bytes dev::paddedRight (bytes _b, unsigned _l)
 Add '0' on, or remove items from, the back of _b until it is of length _l. More...
 
bytes dev::unpadded (bytes _s)
 Removing all trailing '0'. Returns empty array if input contains only '0' char. More...
 
bytes dev::unpadLeft (bytes _s)
 Remove all 0 byte on the head of _s. More...
 
string dev::fromRaw (h256 _n)
 Convert h256 into user-readable string (by directly using std::string constructor). If it can't be interpreted as an ASCII string, empty string is returned. More...