memset method

CString memset(
  1. CString dest,
  2. int c,
  3. int n
)

Copies n bytes from the value c (converted to an unsigned char) into dest. Returns dest.

Implementation

CString memset(CString dest, int c, int n) {
  for (int i = 0; i < n; i++) {
    dest[i] = c & 0xFF;
  }
  return dest;
}