aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
-rw-r--r--llvm/lib/Support/StringRef.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp
index 3ed08ed..096b2d2 100644
--- a/llvm/lib/Support/StringRef.cpp
+++ b/llvm/lib/Support/StringRef.cpp
@@ -98,6 +98,13 @@ unsigned StringRef::edit_distance(llvm::StringRef Other,
AllowReplacements, MaxEditDistance);
}
+unsigned llvm::StringRef::edit_distance_insensitive(
+ StringRef Other, bool AllowReplacements, unsigned MaxEditDistance) const {
+ return llvm::ComputeMappedEditDistance(
+ makeArrayRef(data(), size()), makeArrayRef(Other.data(), Other.size()),
+ llvm::toLower, AllowReplacements, MaxEditDistance);
+}
+
//===----------------------------------------------------------------------===//
// String Operations
//===----------------------------------------------------------------------===//