fixing issue #45: removing leading, trailing and multiple whitespaces.

This commit is contained in:
Kevin Meyer 2014-11-13 21:25:12 +01:00
parent 231f4c0efb
commit 011ba91d87

View File

@ -340,6 +340,11 @@ public class Poche extends Activity {
s = s.replace("ï", "ï"); s = s.replace("ï", "ï");
s = s.replace("ç", "ç"); s = s.replace("ç", "ç");
s = s.replace("&", "&"); s = s.replace("&", "&");
// Replace multiple whitespaces with single space
s = s.replaceAll("\\s+", " ");
s = s.trim();
return s; return s;
} }