summaryrefslogtreecommitdiffstats
path: root/src/typo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/typo.h')
-rw-r--r--src/typo.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/typo.h b/src/typo.h
new file mode 100644
index 0000000..13eaa67
--- /dev/null
+++ b/src/typo.h
@@ -0,0 +1,18 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#ifndef BFS_TYPO_H
+#define BFS_TYPO_H
+
+/**
+ * Find the "typo" distance between two strings.
+ *
+ * @param actual
+ * The actual string typed by the user.
+ * @param expected
+ * The expected valid string.
+ * @return The distance between the two strings.
+ */
+int typo_distance(const char *actual, const char *expected);
+
+#endif // BFS_TYPO_H