>What I meant is, today the setting to be specified for startIndex and endIndex depends on the ignoreNonDigitCharacters setting. You either have to count only digits or all characters. Wouldn't it be simpler if you always take all character into account (indeed applying subString() semantics to the complete given string)?

Well in your way the obvious advantage is that is easier for the user to grasp and configure constraint.
The advantage of the current way is that the data doesn't need to be cleaned before, anything you throw at it can be validated, e.g. user can insert `111.11-1` and `111111`.
Already told that I disagree with the constraint fixing everything in the data, I see no problem with that.

>The other thing is that ignoreNonDigitCharacters currently refers to the entire String but I think it would make more sense if it only referred to the given interval (if one is given). Otherwise you can't process mod11 values such as "123-456-789-X" where you want to ignore the "-" in the number to be validated ("123-456-789") but the check digit could be a character.

I explained my self in other comment maybe the `ignoreNonDigitCharacters` should remove only punctuation characters