From 5faf5b459a06e9708707594d51974cc8d5a67c59 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Thu, 29 Apr 2010 03:29:40 +0200 Subject: Make search a bit more friendly. --- src/org/madore/android/unicodeMap/UnicodeMapActivity.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/org') diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java index 2795c28..5a2622a 100644 --- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java +++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java @@ -362,6 +362,9 @@ public final class UnicodeMapActivity extends ListActivity { final static int searchLimit = 1000; protected void doSearch(String s) { + s = s.replaceAll("\\*", "%"); + s = s.replaceAll("^\\s*", ""); + s = s.replaceAll("\\s*$", ""); Display newDisp = new SearchDisplay(getResources().getString(R.string.search_results), s, searchLimit); saveDisplay(); -- cgit v1.2.3