edk2toollib/uefi/edk2/parsers/guid_parser.py
def c_guid_from_reg_format(cls, guidstring: str) -> str:
        """Convert registry format guidstring to c format guidstring

        Args:
          guidstring: str: registry format guidstring

        Returns:
          Success: guidstring in c format
          Failure: empty string ''
        """
        guidstring = guidstring.strip().strip('} {')
        if(not cls.is_guid_in_reg_format(guidstring)):
            return ''

        GuidList = guidstring.split('-')
        Result = '{'
        for Index in range(0, 3, 1):
            Result = Result + '0x' + GuidList[Index] + ', '
        Result = Result + '{0x' + GuidList[3][0:2] + ', 0x' + GuidList[3][2:4]
        for Index in range(0, 12, 2):
            Result = Result + ', 0x' + GuidList[4][Index:Index + 2]
        Result += '}}'
        return Result
Convert registry format guidstring to c format guidstring

        Args:
          guidstring: str: registry format guidstring

        Returns:
          Success: guidstring in c format
          Failure: empty string ''
        
Convert registry format guidstring to c format guidstring
Convert registry format guidstring to c format guidstring
def c_guid_from_reg_format(cls, guidstring: str) -> str:
        guidstring = guidstring.strip().strip('} {')
        if(not cls.is_guid_in_reg_format(guidstring)):
            return ''
        GuidList = guidstring.split('-')
        Result = '{'
        for Index in range(0, 3, 1):
            Result = Result + '0x' + GuidList[Index] + ', '
        Result = Result + '{0x' + GuidList[3][0:2] + ', 0x' + GuidList[3][2:4]
        for Index in range(0, 12, 2):
            Result = Result + ', 0x' + GuidList[4][Index:Index + 2]
        Result += '}}'
        return Result
def c_guid_from_reg_format ( cls , guidstring : str ) -> str : guidstring = guidstring . strip ( ) . strip ( '} {' ) if ( not cls . is_guid_in_reg_format ( guidstring ) ) : return '' GuidList = guidstring . split ( '-' ) Result = '{' for Index in range ( 0 , 3 , 1 ) : Result = Result + '0x' + GuidList [ Index ] + ', ' Result = Result + '{0x' + GuidList [ 3 ] [ 0 : 2 ] + ', 0x' + GuidList [ 3 ] [ 2 : 4 ] for Index in range ( 0 , 12 , 2 ) : Result = Result + ', 0x' + GuidList [ 4 ] [ Index : Index + 2 ] Result += '}}' return Result
Convert registry format guidstring to c format guidstring
Convert registry format guidstring to c format guidstring
"""Convert registry format guidstring to c format guidstring

        Args:
          guidstring: str: registry format guidstring

        Returns:
          Success: guidstring in c format
          Failure: empty string ''
        """
guidstring in c format
Failure: empty string ''
guidstring in c format Failure : empty string ' '
Success
cls
guidstring
str
registry format guidstring
registry format guidstring