aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore/CommonData.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-25 18:43:58 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-29 22:50:28 +0800
commitcd22da1d9e77a9a7b6fe3ecf5bd828977acc6282 (patch)
tree2360a810f3d800407a5bbd4e6bd483b51dfa028f /libdevcore/CommonData.cpp
parenta3f77527e9da0005e3c6d9cbd4c6a56c17c1089c (diff)
downloaddexon-solidity-cd22da1d9e77a9a7b6fe3ecf5bd828977acc6282.tar.gz
dexon-solidity-cd22da1d9e77a9a7b6fe3ecf5bd828977acc6282.tar.zst
dexon-solidity-cd22da1d9e77a9a7b6fe3ecf5bd828977acc6282.zip
Remove escape function.
Diffstat (limited to 'libdevcore/CommonData.cpp')
-rw-r--r--libdevcore/CommonData.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/libdevcore/CommonData.cpp b/libdevcore/CommonData.cpp
index 14caf494..db11e61c 100644
--- a/libdevcore/CommonData.cpp
+++ b/libdevcore/CommonData.cpp
@@ -28,34 +28,6 @@
using namespace std;
using namespace dev;
-std::string dev::escaped(std::string const& _s, bool _all)
-{
- static const map<char, char> prettyEscapes{{'\r', 'r'}, {'\n', 'n'}, {'\t', 't'}, {'\v', 'v'}};
- std::string ret;
- ret.reserve(_s.size() + 2);
- ret.push_back('"');
- for (auto i: _s)
- if (i == '"' && !_all)
- ret += "\\\"";
- else if (i == '\\' && !_all)
- ret += "\\\\";
- else if (prettyEscapes.count(i) && !_all)
- {
- ret += '\\';
- ret += prettyEscapes.find(i)->second;
- }
- else if (i < ' ' || _all)
- {
- ret += "\\x";
- ret.push_back("0123456789abcdef"[(uint8_t)i / 16]);
- ret.push_back("0123456789abcdef"[(uint8_t)i % 16]);
- }
- else
- ret.push_back(i);
- ret.push_back('"');
- return ret;
-}
-
int dev::fromHex(char _i, WhenError _throw)
{
if (_i >= '0' && _i <= '9')