Usage notes

  1. If the buffer pointers are the same, the padding is done in place. If not, at most BufferLength characters are copied into the second buffer; any space remaining, including the null-termination character, is overwritten with spaces.
  2. If the String and Buffer parameters partially overlap, the result is undefined.