We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de00a86 commit 7e1eb9cCopy full SHA for 7e1eb9c
src/main/java/VerbalExpression.java
@@ -132,13 +132,11 @@ public VerbalExpression any(String value) {
132
return this;
133
}
134
135
- public VerbalExpression range(Object[] args) {
+ public VerbalExpression range(String... args) {
136
String value = "[";
137
- for(int _from = 0; _from < args.length; _from += 2) {
138
- int _to = _from+1;
139
- if (args.length <= _to) break;
140
- int from = Integer.getInteger(sanitize((String)args[_from]));
141
- int to = Integer.getInteger(sanitize((String)args[_to]));
+ for (int _to = 1; _to < args.length; _to += 2) {
+ String from = sanitize((String)args[_to - 1]);
+ String to = sanitize((String)args[_to]);
142
143
value += from + "-" + to;
144
0 commit comments