| Set rop from a null-terminated string str in the given base. The string can be an integer like "41" or a fraction like "41/152".  The
fraction must be in canonical form (see Rational Number Functions), or if
not then mpq_canonicalizemust be called. The numerator and optional denominator are parsed the same as in
mpz_set_str(see Assigning Integers).  White space is allowed in
the string, and is simply ignored.  The base can vary from 2 to 36, or
if base is 0 then the leading characters are used:0xfor hex,0for octal, or decimal otherwise.  Note that this is done separately
for the numerator and denominator, so for instance0xEF/100is 239/100,
whereas0xEF/0x100is 239/256. The return value is 0 if the entire string is a valid number, or -1 if
not. 
 |