commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <benerit...@gmail.com>
Subject Re: RandomStringUtils with variable lengths
Date Tue, 02 Jun 2015 06:27:42 GMT
Hello Caleb,

2015-05-24 22:16 GMT+02:00 Caleb Cushing <xenoterracide@gmail.com>:

> I have written the following for my own project, and a couple of
> variants elsewhere (randomNumeric( min, max ) etc.
>
> Also I'm considering maybe a randomGraph() (for printable characters
> that match the posix graph regex), and random utf8.
>
> I find these useful for test input data.
>
>  if I wrote it into a patch for RandomStringUtils including docs and
> tests would it be accepted/is it something the project would be
> interested in? (please cc me I'm not on the list)
>
> public class RandomUtil {
>     public static String randomAlphanumeric( final int minLength,
> final int maxLength ) {
>         return RandomStringUtils.randomAlphanumeric(
> RandomUtils.nextInt( minLength, maxLength ) );
>     }
> }
>

I'm not sure I understand your proposal. Is this about returning a single
random character?
It would be good if you could provide a patch with some unit tests. You can
use GitHub for contributing [1]

Thank you!
Benedikt

[1] https://github.com/apache/commons-lang


>
>
> --
> Caleb Cushing
>
> http://xenoterracide.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message