code: @NullSafe
    public static String truncate(String value, int length) {
  
      assertThat(length).throwing(new IllegalArgumentException(String.format(
        "[%d] must be greater than equal to 0", length))).isGreaterThanEqualTo(0);
  
      return (value != null ? value.substring(0, Math.min(value.length(), length)) : null);
    }
docs: Truncates the given String to the desired length.  If the String is blank, empty or null, then value is returned,
  otherwise the String is truncated to the maximum length determined by the value's length and desired length.
  
  @param value the String to truncate.
  @param length an integer specifying the length to truncate the String to.
  @return the given String truncated to length, or the entire String if the desired length exceeds
  the String's length.
  @throws IllegalArgumentException if length is less than 0.
  @see java.lang.String#substring(int, int)
  @see java.lang.String#length()