aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore/StringUtils.h
diff options
context:
space:
mode:
authorBalajiganapathi S <balajiganapathi.s@gmail.com>2017-11-22 00:50:35 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-02-13 23:00:15 +0800
commit8a491c77ba9680afdf8c33664e905b978152b095 (patch)
tree04eb2325c2a6e20d6a21ef0d9fe64efc1629d9a6 /libdevcore/StringUtils.h
parentd123e777d33be3134ebbcda969f149e0e7ad0b0f (diff)
downloaddexon-solidity-8a491c77ba9680afdf8c33664e905b978152b095.tar.gz
dexon-solidity-8a491c77ba9680afdf8c33664e905b978152b095.tar.zst
dexon-solidity-8a491c77ba9680afdf8c33664e905b978152b095.zip
Restructure code for alternative identifier suggestions
Diffstat (limited to 'libdevcore/StringUtils.h')
-rw-r--r--libdevcore/StringUtils.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libdevcore/StringUtils.h b/libdevcore/StringUtils.h
index d3f9f8d9..acd93e32 100644
--- a/libdevcore/StringUtils.h
+++ b/libdevcore/StringUtils.h
@@ -24,12 +24,16 @@
#pragma once
#include <string>
+#include <vector>
namespace dev
{
-/// Calculates the Damerau–Levenshtein distance between @a _name1 and @a _name2 and
-/// @returns true if that distance is not greater than @a _maxDistance
-bool stringWithinDistance(std::string const& _name1, std::string const& _name2, size_t _maxDistance);
+// Calculates the Damerau–Levenshtein distance between _str1 and _str2 and returns true if that distance is not greater than _maxDistance
+bool stringWithinDistance(std::string const& _str1, std::string const& _str2, size_t _maxDistance);
+// Calculates the Damerau–Levenshtein distance between _str1 and _str2
+size_t stringDistance(std::string const& _str1, std::string const& _str2);
+// Return a string having elements of suggestions as quoted, alternative suggestions. e.g. "a", "b" or "c"
+std::string quotedAlternativesList(std::vector<std::string> const& suggestions);
}