Skip to content
This repository has been archived by the owner on Mar 11, 2018. It is now read-only.

com.rockymadden.stringmetric.transform character ranges are exclusive #24

Open
zoltanmaric opened this issue Nov 17, 2015 · 0 comments
Open

Comments

@zoltanmaric
Copy link

The character ranges in com.rockymadden.stringmetric.transform

    private val Ascii = NumericRange(0x00, 0x7F, 1)
    private val ExtendedAscii = NumericRange(0x00, 0x7F, 1)
    private val Latin = NumericRange(0x00, 0x24F, 1)
    private val LowerCase = NumericRange(0x61, 0x7A, 1)
    private val Numbers = NumericRange(0x30, 0x39, 1)
    private val UpperCase = NumericRange(0x41, 0x5A, 1)

do not include all the intended characters, because the apply method of Scala's NumericRange is exclusive, i.e. it does not include the upper bound of the defined range. Consequently, LowerCase does not include z, UpperCase does not include Z, Numbers does not include 9, etc.
Thus, when using withTransform with any of the predefined filters in this object, these characters will be discarded from comparison.

zoltanmaric pushed a commit to zoltanmaric/stringmetric that referenced this issue Nov 17, 2015
zoltanmaric pushed a commit to zoltanmaric/stringmetric that referenced this issue Nov 17, 2015
zoltanmaric pushed a commit to zoltanmaric/stringmetric that referenced this issue Nov 17, 2015
zoltanmaric pushed a commit to zoltanmaric/stringmetric that referenced this issue Nov 17, 2015
zoltanmaric pushed a commit to zoltanmaric/stringmetric that referenced this issue Nov 17, 2015
zoltanmaric pushed a commit to zoltanmaric/stringmetric that referenced this issue Nov 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant