Re: Analogous to Print() but for keyboard input?


Laszlo Ersek
 

On 01/13/20 05:34, alejandro.estay@gmail.com wrote:
Is there some library like UefiLib, with some function working like
scanf()? For example, print() shares some things with printf(), but I
can't find any related to input working that way.
I don't really understand your question.

If you are looking for functions that parse string representations of
integers into integer variables, "MdePkg/Include/Library/BaseLib.h" has:

(Ascii)?Str(Decimal|Hex)ToUint(64|n)S?

Before exposing any such function to untrusted input, I'd strongly
recommend double-checking the implementation.

For regular expressions, you could include RegularExpressionDxe in your
platform build, and use EFI_REGULAR_EXPRESSION_PROTOCOL.

HTH
Laszlo

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