docs: public static String cut(String pString, int pMaxLen, String pPad) {
          if (pString == null) {
              return null;
          }
          if (pPad == null) {
              pPad = "";
          }
          int len = pString.length();
  
          if (len > pMaxLen) {
              len = pString.lastIndexOf(' ', pMaxLen - pPad.length());
          }
          else {
              return pString;
          }
          return pString.substring(0, len) + pPad;
      }