STRNCPY function question

I found a piece of code that uses the strncpy function that is strange. The code grabs wifi information from an ESP8266 and displays it on an oled display.

strncpy(dst, src, dst_size)

In the code:

//Print SSID and RSSI for each network found
        sprintf(myStr,"%s ",WiFi.SSID(i).c_str()); // copy in the SSID
        strncpy(mySSIDstr,myStr,10);      // then truncate it
        myStr[12] = 0; 
        rssi[3] = 0;
        encryp[1] = 0;

        sprintf(rssi,"%d",WiFi.RSSI(i));
        sendStrXY(myStr,c,0); // display SSID
        sendStrXY(rssi,c,11); //display RSSI - 13

For the line strncpy(mySSIDstr,myStr,10); why does myStr get pushed into mySSIDstr but mySSIDstr never get used? I would think sendStrXY(myStr,c,0); // display SSID should be sendStrXY(mySSIDstr,c,0); // display SSID

For the line strncpy(mySSIDstr,myStr,10); why does myStr get pushed into mySSIDstr but mySSIDstr never get used?

Maybe it is used outside of the snippet you posted. You can't really expect answers about code you didn't post.

In that snippet, there is no reason to have made a copy of myStr. There is no reason for those stupid named, either. My string? Who else's string would it be?