How do I add a null terminator to the end of the string?
char *copy(char *dest, const char *src, int capacity) {
    memset(dest, '\0', capacity);
    // Case 1: dest < src; cannot fully copy over, need to null terminate
    for (int i = 0; i < capacity && src[i] != '\0'; i++) {
        dest[i] = src[i];
    } dest[capacity] = '\0';
    // Case 2: dest > src; have space left in dest
    // Already memset so no need to worry
    return dest;
}
