char *copy(char *dest, const char *src, int capacity) {
    //dest = destination string
    // copy from source and dest
    int counter = 0;
    while (src[counter] != '\0' || counter < capacity) {
        dest[counter] = src[counter];
    }
    dest[counter - 1] = '\0';
    return dest;
}
copy char from src to dest