Functions for coversion strings to intergers


Konstantin Aladyshev
 

Are there any library functions that can convert a string with a
decimal number to a number, and tell if the conversion was successful?

I've found StrDecimalToUintnS and StrDecimalToUint64S functions in a
https://github.com/tianocore/edk2/blob/master/MdePkg/Library/BaseLib/SafeString.c
But it looks like they always return `RETURN_SUCCESS`, no matter if
the passed string contains a number. In this case the function simply
fills the number value with a 0.

Also why aren't there any functions for conversion of signed numbers?
Something like StrDecimalToIntnS/StrDecimalToInt64S ?

Best regards,
Konstantin Aladyshev

Join {discuss@edk2.groups.io to automatically receive all group messages.