The node you are looking for is at
mpfr_get_str_ndigits
.