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

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

@zoltanmaric

Description

@zoltanmaric

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions