mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
lib: Add a function to convert a string to upper case
Add a helper function for this operation. Update the strtoul() tests to check upper case as well. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
@@ -222,4 +222,16 @@ bool str2long(const char *p, ulong *num);
|
||||
* @hz: Value to convert
|
||||
*/
|
||||
char *strmhz(char *buf, unsigned long hz);
|
||||
|
||||
/**
|
||||
* str_to_upper() - Convert a string to upper case
|
||||
*
|
||||
* This simply uses toupper() on each character of the string.
|
||||
*
|
||||
* @in: String to convert (must be large enough to hold the output string)
|
||||
* @out: Buffer to put converted string
|
||||
* @len: Number of bytes available in @out (SIZE_MAX for all)
|
||||
*/
|
||||
void str_to_upper(const char *in, char *out, size_t len);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user