Wrote functions pstr_ncpy and pstr_cat.