From 92e901392b55e28da5511be742f24a24cfc05d7c Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 22 Nov 2022 22:31:48 +0100 Subject: [PATCH] Fix incorrect `trigramForName` method --- app/src/main/java/ch/nuth/zhaw/exbox/FuzzySearchServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/FuzzySearchServer.java b/app/src/main/java/ch/nuth/zhaw/exbox/FuzzySearchServer.java index 53a4b92..a1d9bd9 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/FuzzySearchServer.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/FuzzySearchServer.java @@ -48,7 +48,7 @@ public class FuzzySearchServer implements CommandExecutor { name = nomalize(name); // TODO implement - for (int i = 0; i < name.length() - 3; i++) { + for (int i = 0; i <= name.length() - 3; i++) { result.add(name.substring(i, i + 3)); }