Class Strings

java.lang.Object
me.despical.commons.util.Strings

public final class Strings extends Object
Author:
Despical

Created at 17.06.2020

  • Method Details

    • format

      public static String format(String string)
    • repeat

      public static String repeat(String string, int count)
      Returns a string consisting of a specific number of concatenated copies of an input string. For example, repeat("hey", 3) returns the string "heyheyhey".
      Parameters:
      string - any non-null string
      count - the number of times to repeat it; a nonnegative integer
      Returns:
      a string containing string repeated count times (the empty string if count is zero)
      Throws:
      IllegalArgumentException - if count is negative