summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2010-04-29 03:29:40 +0200
committerDavid A. Madore <david+git@madore.org>2010-04-29 03:29:40 +0200
commit5faf5b459a06e9708707594d51974cc8d5a67c59 (patch)
tree58ef2189305702820c0e753e1145d90227a27a32 /src
parent6b1b044c5e51218c03eeccf5dddb65b58e25d22f (diff)
downloadUnicodeMap-5faf5b459a06e9708707594d51974cc8d5a67c59.tar.gz
UnicodeMap-5faf5b459a06e9708707594d51974cc8d5a67c59.tar.bz2
UnicodeMap-5faf5b459a06e9708707594d51974cc8d5a67c59.zip
Make search a bit more friendly.
Diffstat (limited to 'src')
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java3
1 files changed, 3 insertions, 0 deletions
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();