iPXE
string.h File Reference

String functions. More...

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
unsigned int digit_value (unsigned int digit)
 Calculate digit value.

Detailed Description

String functions.

Definition in file string.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ digit_value()

unsigned int digit_value ( unsigned int character)
extern

Calculate digit value.

Parameters
characterDigit character
Return values
digitDigit value

Invalid digits will be returned as a value greater than or equal to the numeric base.

Definition at line 458 of file string.c.

458 {
459
460 if ( character >= 'a' )
461 return ( character - ( 'a' - 10 ) );
462 if ( character >= 'A' )
463 return ( character - ( 'A' - 10 ) );
464 if ( character <= '9' )
465 return ( character - '0' );
466 return character;
467}

Referenced by hex_decode(), string_test_exec(), strtoul(), and strtoull().