Package 

Class StringProvider

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      StringProvider getUnique() An instance of T for generating unique values
      final String numerify(String template) Replaces every # char for this template string with a random int from 0 to 9 inclusive, and returns the modified String.
      final String letterify(String template, Boolean upper) Replaces every ? char for this template string with a random letter from the English alphabet, and returns the modified String.
      final String bothify(String template, Boolean upper) Combines applies both numerify and letterify functions to the template string, and returns the modified String.
      final String regexify(String template) Returns a string of generated values based on the regex expressions in the template input, for example regexify("""\d{3}""") will return a string consisting of 3 random digits.
      • Methods inherited from class io.github.serpro69.kfaker.provider.misc.StringProvider

        clear, clearAll
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • numerify

         final String numerify(String template)

        Replaces every # char for this template string with a random int from 0 to 9 inclusive, and returns the modified String.

      • letterify

         final String letterify(String template, Boolean upper)

        Replaces every ? char for this template string with a random letter from the English alphabet, and returns the modified String.

        Parameters:
        upper - set to true or false to control the case of generated letters.
      • regexify

         final String regexify(String template)

        Returns a string of generated values based on the regex expressions in the template input, for example regexify("""\d{3}""") will return a string consisting of 3 random digits.