Open ZmurLV opened 4 years ago
It's possible to achieve this result.
new StringsDSL().betweenCodePoints((int) '0', (int)'9').ofLengthBetween(22, 22);
or
new StringsDSL().betweenCodePoints(48, 57).ofLengthBetween(22, 22);
depending on personal preferences.
A dedicated API for this might also be nice.
Needed to create strings like this: "ISO0260000590230322000012A800001" that is a constant "ISO" + 22 numeric characters + A + 6 numeric characters. Could not generate a numeric string of fixed length, because strings().numeric() doesn't seem to allow to set the length of a result.