diff options
author | Rocky Madden <git@rockymadden.com> | 2012-11-01 09:27:47 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2012-11-01 09:27:47 -0600 |
commit | f7a2586e71eac928f1a6c4817f6d6ee99669a249 (patch) | |
tree | 8ebec5ba48770646d6cd35f6fa14ccc26ed573b9 /core | |
parent | 289212a263b92e44b676f34213ae641b9500a836 (diff) | |
download | stringmetric-f7a2586e71eac928f1a6c4817f6d6ee99669a249.tar.gz stringmetric-f7a2586e71eac928f1a6c4817f6d6ee99669a249.tar.bz2 stringmetric-f7a2586e71eac928f1a6c4817f6d6ee99669a249.zip |
Overloaded string methods now pass the buck to their character array counter parts.
Diffstat (limited to 'core')
-rwxr-xr-x | core/source/core/scala/org/hashtree/stringmetric/AsciiLetterCaseStringFilter.scala | 2 | ||||
-rwxr-xr-x | core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/source/core/scala/org/hashtree/stringmetric/AsciiLetterCaseStringFilter.scala b/core/source/core/scala/org/hashtree/stringmetric/AsciiLetterCaseStringFilter.scala index 5977c34..02da3ae 100755 --- a/core/source/core/scala/org/hashtree/stringmetric/AsciiLetterCaseStringFilter.scala +++ b/core/source/core/scala/org/hashtree/stringmetric/AsciiLetterCaseStringFilter.scala @@ -10,5 +10,5 @@ trait AsciiLetterCaseStringFilter extends StringFilter { ) } - abstract override def filter(string: String): String = super.filter(string.toLowerCase) + abstract override def filter(string: String): String = filter(string.toCharArray).mkString }
\ No newline at end of file diff --git a/core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala b/core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala index aaa21a5..425cf13 100755 --- a/core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala +++ b/core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala @@ -4,5 +4,5 @@ package org.hashtree.stringmetric trait AsciiSpaceStringFilter extends StringFilter { abstract override def filter(charArray: Array[Char]): Array[Char] = super.filter(charArray.filter(_ != ' ')) - abstract override def filter(string: String): String = super.filter(string.replaceAllLiterally(" ", "")) + abstract override def filter(string: String): String = filter(string.toCharArray).mkString }
\ No newline at end of file |