11#define RSIZE_MAX (PcdGet32 (PcdMaximumUnicodeStringLength))
13#define ASCII_RSIZE_MAX (PcdGet32 (PcdMaximumAsciiStringLength))
15#define SAFE_STRING_CONSTRAINT_CHECK(Expression, Status) \
17 if (!(Expression)) { \
18 DEBUG ((DEBUG_VERBOSE, \
19 "%a(%d) %a: SAFE_STRING_CONSTRAINT_CHECK(%a) failed. Return %r\n", \
20 __FILE__, DEBUG_LINE_NUMBER, __func__, DEBUG_EXPRESSION_STRING (Expression), Status)); \
126 ASSERT (((
UINTN)String & BIT0) == 0);
131 if ((String ==
NULL) || (MaxSize == 0)) {
142 while (String[Length] != 0) {
143 if (Length >= MaxSize - 1) {
184 if (String ==
NULL) {
195 return (
StrnLenS (String, MaxSize) + 1) *
sizeof (*String);
227 OUT CHAR16 *Destination,
234 ASSERT (((
UINTN)Destination & BIT0) == 0);
235 ASSERT (((
UINTN)Source & BIT0) == 0);
246 if (RSIZE_MAX != 0) {
258 SourceLen =
StrnLenS (Source, DestMax);
270 while (*Source != 0) {
271 *(Destination++) = *(Source++);
311 OUT CHAR16 *Destination,
319 ASSERT (((
UINTN)Destination & BIT0) == 0);
320 ASSERT (((
UINTN)Source & BIT0) == 0);
331 if (RSIZE_MAX != 0) {
344 SourceLen =
StrnLenS (Source,
MIN (DestMax, Length));
345 if (Length >= DestMax) {
352 if (SourceLen > Length) {
364 while ((SourceLen > 0) && (*Source != 0)) {
365 *(Destination++) = *(Source++);
406 IN OUT CHAR16 *Destination,
415 ASSERT (((
UINTN)Destination & BIT0) == 0);
416 ASSERT (((
UINTN)Source & BIT0) == 0);
421 DestLen =
StrnLenS (Destination, DestMax);
422 CopyLen = DestMax - DestLen;
433 if (RSIZE_MAX != 0) {
450 SourceLen =
StrnLenS (Source, CopyLen);
463 Destination = Destination + DestLen;
464 while (*Source != 0) {
465 *(Destination++) = *(Source++);
508 IN OUT CHAR16 *Destination,
518 ASSERT (((
UINTN)Destination & BIT0) == 0);
519 ASSERT (((
UINTN)Source & BIT0) == 0);
524 DestLen =
StrnLenS (Destination, DestMax);
525 CopyLen = DestMax - DestLen;
536 if (RSIZE_MAX != 0) {
554 SourceLen =
StrnLenS (Source,
MIN (CopyLen, Length));
555 if (Length >= CopyLen) {
562 if (SourceLen > Length) {
575 Destination = Destination + DestLen;
576 while ((SourceLen > 0) && (*Source != 0)) {
577 *(Destination++) = *(Source++);
633 OUT CHAR16 **EndPointer OPTIONAL,
637 ASSERT (((
UINTN)String & BIT0) == 0);
648 if (RSIZE_MAX != 0) {
652 if (EndPointer !=
NULL) {
653 *EndPointer = (CHAR16 *)String;
659 while ((*String == L
' ') || (*String == L
'\t')) {
666 while (*String == L
'0') {
678 if (*Data > ((MAX_UINTN - (*String - L
'0')) / 10)) {
680 if (EndPointer !=
NULL) {
681 *EndPointer = (CHAR16 *)String;
687 *Data = *Data * 10 + (*String - L
'0');
691 if (EndPointer !=
NULL) {
692 *EndPointer = (CHAR16 *)String;
745 OUT CHAR16 **EndPointer OPTIONAL,
749 ASSERT (((
UINTN)String & BIT0) == 0);
760 if (RSIZE_MAX != 0) {
764 if (EndPointer !=
NULL) {
765 *EndPointer = (CHAR16 *)String;
771 while ((*String == L
' ') || (*String == L
'\t')) {
778 while (*String == L
'0') {
790 if (*Data >
DivU64x32 (MAX_UINT64 - (*String - L
'0'), 10)) {
792 if (EndPointer !=
NULL) {
793 *EndPointer = (CHAR16 *)String;
799 *Data =
MultU64x32 (*Data, 10) + (*String - L
'0');
803 if (EndPointer !=
NULL) {
804 *EndPointer = (CHAR16 *)String;
862 OUT CHAR16 **EndPointer OPTIONAL,
866 BOOLEAN FoundLeadingZero;
868 FoundLeadingZero =
FALSE;
869 ASSERT (((
UINTN)String & BIT0) == 0);
880 if (RSIZE_MAX != 0) {
884 if (EndPointer !=
NULL) {
885 *EndPointer = (CHAR16 *)String;
891 while ((*String == L
' ') || (*String == L
'\t')) {
899 FoundLeadingZero = *String == L
'0';
900 while (*String == L
'0') {
905 if (!FoundLeadingZero) {
926 if (EndPointer !=
NULL) {
927 *EndPointer = (CHAR16 *)String;
937 if (EndPointer !=
NULL) {
938 *EndPointer = (CHAR16 *)String;
996 OUT CHAR16 **EndPointer OPTIONAL,
1000 BOOLEAN FoundLeadingZero;
1002 FoundLeadingZero =
FALSE;
1003 ASSERT (((
UINTN)String & BIT0) == 0);
1014 if (RSIZE_MAX != 0) {
1018 if (EndPointer !=
NULL) {
1019 *EndPointer = (CHAR16 *)String;
1025 while ((*String == L
' ') || (*String == L
'\t')) {
1032 FoundLeadingZero = *String == L
'0';
1033 while (*String == L
'0') {
1038 if (!FoundLeadingZero) {
1059 if (EndPointer !=
NULL) {
1060 *EndPointer = (CHAR16 *)String;
1070 if (EndPointer !=
NULL) {
1071 *EndPointer = (CHAR16 *)String;
1131 OUT CHAR16 **EndPointer OPTIONAL,
1133 OUT UINT8 *PrefixLength OPTIONAL
1136 RETURN_STATUS Status;
1140 UINT8 LocalPrefixLength;
1141 CONST CHAR16 *Pointer;
1143 UINTN CompressStart;
1144 BOOLEAN ExpectPrefix;
1146 LocalPrefixLength = MAX_UINT8;
1148 ExpectPrefix =
FALSE;
1150 ASSERT (((
UINTN)String & BIT0) == 0);
1158 for (Pointer = String, AddressIndex = 0; AddressIndex <
ARRAY_SIZE (Address->Addr) + 1;) {
1160 if (*Pointer != L
':') {
1178 if ((CompressStart !=
ARRAY_SIZE (Address->Addr)) || (AddressIndex ==
ARRAY_SIZE (Address->Addr))) {
1188 CompressStart = AddressIndex;
1191 if (CompressStart == 0) {
1192 if (*Pointer != L
':') {
1205 if (*Pointer == L
'/') {
1209 if (CompressStart != AddressIndex) {
1216 if (!ExpectPrefix) {
1232 ASSERT (AddressIndex + 1 <
ARRAY_SIZE (Address->Addr));
1233 LocalAddress.Addr[AddressIndex] = (UINT8)((UINT16)Uintn >> 8);
1234 LocalAddress.Addr[AddressIndex + 1] = (UINT8)Uintn;
1241 if (
RETURN_ERROR (Status) || (End == Pointer) || (Uintn > 128)) {
1248 LocalPrefixLength = (UINT8)Uintn;
1257 if (*Pointer == L
'/') {
1258 ExpectPrefix =
TRUE;
1259 }
else if (*Pointer == L
':') {
1260 if (AddressIndex ==
ARRAY_SIZE (Address->Addr)) {
1276 if (((AddressIndex ==
ARRAY_SIZE (Address->Addr)) && (CompressStart !=
ARRAY_SIZE (Address->Addr))) ||
1277 ((AddressIndex !=
ARRAY_SIZE (Address->Addr)) && (CompressStart ==
ARRAY_SIZE (Address->Addr)))
1287 CopyMem (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
1288 ZeroMem (&Address->Addr[CompressStart],
ARRAY_SIZE (Address->Addr) - AddressIndex);
1289 if (AddressIndex > CompressStart) {
1291 &Address->Addr[CompressStart +
ARRAY_SIZE (Address->Addr) - AddressIndex],
1292 &LocalAddress.Addr[CompressStart],
1293 AddressIndex - CompressStart
1297 if (PrefixLength !=
NULL) {
1298 *PrefixLength = LocalPrefixLength;
1301 if (EndPointer !=
NULL) {
1302 *EndPointer = (CHAR16 *)Pointer;
1353 OUT CHAR16 **EndPointer OPTIONAL,
1355 OUT UINT8 *PrefixLength OPTIONAL
1358 RETURN_STATUS Status;
1362 UINT8 LocalPrefixLength;
1365 LocalPrefixLength = MAX_UINT8;
1367 ASSERT (((
UINTN)String & BIT0) == 0);
1375 for (Pointer = (CHAR16 *)String, AddressIndex = 0; AddressIndex <
ARRAY_SIZE (Address->Addr) + 1;) {
1391 if (AddressIndex ==
ARRAY_SIZE (Address->Addr)) {
1399 LocalPrefixLength = (UINT8)Uintn;
1404 if (Uintn > MAX_UINT8) {
1408 LocalAddress.Addr[AddressIndex] = (UINT8)Uintn;
1415 if (AddressIndex ==
ARRAY_SIZE (Address->Addr)) {
1416 if (*Pointer == L
'/') {
1428 }
else if (AddressIndex <
ARRAY_SIZE (Address->Addr)) {
1429 if (*Pointer == L
'.') {
1440 if (AddressIndex <
ARRAY_SIZE (Address->Addr)) {
1444 CopyMem (Address, &LocalAddress,
sizeof (*Address));
1445 if (PrefixLength !=
NULL) {
1446 *PrefixLength = LocalPrefixLength;
1449 if (EndPointer !=
NULL) {
1450 *EndPointer = Pointer;
1505 RETURN_STATUS Status;
1508 ASSERT (((
UINTN)String & BIT0) == 0);
1519 Status =
StrHexToBytes (String, 2 *
sizeof (LocalGuid.Data1), (UINT8 *)&LocalGuid.Data1, sizeof (LocalGuid.Data1));
1520 if (
RETURN_ERROR (Status) || (String[2 *
sizeof (LocalGuid.Data1)] != L
'-')) {
1528 String += 2 *
sizeof (LocalGuid.Data1) + 1;
1533 Status =
StrHexToBytes (String, 2 *
sizeof (LocalGuid.Data2), (UINT8 *)&LocalGuid.Data2, sizeof (LocalGuid.Data2));
1534 if (
RETURN_ERROR (Status) || (String[2 *
sizeof (LocalGuid.Data2)] != L
'-')) {
1542 String += 2 *
sizeof (LocalGuid.Data2) + 1;
1547 Status =
StrHexToBytes (String, 2 *
sizeof (LocalGuid.Data3), (UINT8 *)&LocalGuid.Data3, sizeof (LocalGuid.Data3));
1548 if (
RETURN_ERROR (Status) || (String[2 *
sizeof (LocalGuid.Data3)] != L
'-')) {
1556 String += 2 *
sizeof (LocalGuid.Data3) + 1;
1561 Status =
StrHexToBytes (String, 2 * 2, &LocalGuid.Data4[0], 2);
1562 if (
RETURN_ERROR (Status) || (String[2 * 2] != L
'-')) {
1566 String += 2 * 2 + 1;
1571 Status =
StrHexToBytes (String, 2 * 6, &LocalGuid.Data4[2], 6);
1624 ASSERT (((
UINTN)String & BIT0) == 0);
1635 if (RSIZE_MAX != 0) {
1652 for (Index = 0; Index < Length; Index++) {
1658 if (Index != Length) {
1665 for (Index = 0; Index < Length; Index++) {
1670 if ((Index & BIT0) == 0) {
1706 if ((String ==
NULL) || (MaxSize == 0)) {
1717 while (String[Length] != 0) {
1718 if (Length >= MaxSize - 1) {
1758 if (String ==
NULL) {
1769 return (
AsciiStrnLenS (String, MaxSize) + 1) *
sizeof (*String);
1798 OUT CHAR8 *Destination,
1814 if (ASCII_RSIZE_MAX != 0) {
1838 while (*Source != 0) {
1839 *(Destination++) = *(Source++);
1876 OUT CHAR8 *Destination,
1893 if (ASCII_RSIZE_MAX != 0) {
1907 if (Length >= DestMax) {
1914 if (SourceLen > Length) {
1926 while ((SourceLen > 0) && (*Source != 0)) {
1927 *(Destination++) = *(Source++);
1965 IN OUT CHAR8 *Destination,
1978 CopyLen = DestMax - DestLen;
1989 if (ASCII_RSIZE_MAX != 0) {
2019 Destination = Destination + DestLen;
2020 while (*Source != 0) {
2021 *(Destination++) = *(Source++);
2061 IN OUT CHAR8 *Destination,
2075 CopyLen = DestMax - DestLen;
2086 if (ASCII_RSIZE_MAX != 0) {
2105 if (Length >= CopyLen) {
2112 if (SourceLen > Length) {
2125 Destination = Destination + DestLen;
2126 while ((SourceLen > 0) && (*Source != 0)) {
2127 *(Destination++) = *(Source++);
2181 OUT CHAR8 **EndPointer OPTIONAL,
2194 if (ASCII_RSIZE_MAX != 0) {
2198 if (EndPointer !=
NULL) {
2199 *EndPointer = (CHAR8 *)String;
2205 while ((*String ==
' ') || (*String ==
'\t')) {
2212 while (*String ==
'0') {
2224 if (*Data > ((MAX_UINTN - (*String -
'0')) / 10)) {
2226 if (EndPointer !=
NULL) {
2227 *EndPointer = (CHAR8 *)String;
2233 *Data = *Data * 10 + (*String -
'0');
2237 if (EndPointer !=
NULL) {
2238 *EndPointer = (CHAR8 *)String;
2289 OUT CHAR8 **EndPointer OPTIONAL,
2302 if (ASCII_RSIZE_MAX != 0) {
2306 if (EndPointer !=
NULL) {
2307 *EndPointer = (CHAR8 *)String;
2313 while ((*String ==
' ') || (*String ==
'\t')) {
2320 while (*String ==
'0') {
2332 if (*Data >
DivU64x32 (MAX_UINT64 - (*String -
'0'), 10)) {
2334 if (EndPointer !=
NULL) {
2335 *EndPointer = (CHAR8 *)String;
2341 *Data =
MultU64x32 (*Data, 10) + (*String -
'0');
2345 if (EndPointer !=
NULL) {
2346 *EndPointer = (CHAR8 *)String;
2401 OUT CHAR8 **EndPointer OPTIONAL,
2405 BOOLEAN FoundLeadingZero;
2407 FoundLeadingZero =
FALSE;
2417 if (ASCII_RSIZE_MAX != 0) {
2421 if (EndPointer !=
NULL) {
2422 *EndPointer = (CHAR8 *)String;
2428 while ((*String ==
' ') || (*String ==
'\t')) {
2435 FoundLeadingZero = *String ==
'0';
2436 while (*String ==
'0') {
2441 if (!FoundLeadingZero) {
2462 if (EndPointer !=
NULL) {
2463 *EndPointer = (CHAR8 *)String;
2473 if (EndPointer !=
NULL) {
2474 *EndPointer = (CHAR8 *)String;
2529 OUT CHAR8 **EndPointer OPTIONAL,
2533 BOOLEAN FoundLeadingZero;
2535 FoundLeadingZero =
FALSE;
2545 if (ASCII_RSIZE_MAX != 0) {
2549 if (EndPointer !=
NULL) {
2550 *EndPointer = (CHAR8 *)String;
2556 while ((*String ==
' ') || (*String ==
'\t')) {
2563 FoundLeadingZero = *String ==
'0';
2564 while (*String ==
'0') {
2569 if (!FoundLeadingZero) {
2590 if (EndPointer !=
NULL) {
2591 *EndPointer = (CHAR8 *)String;
2601 if (EndPointer !=
NULL) {
2602 *EndPointer = (CHAR8 *)String;
2652 OUT CHAR8 *Destination,
2658 ASSERT (((
UINTN)Source & BIT0) == 0);
2669 if (ASCII_RSIZE_MAX != 0) {
2673 if (RSIZE_MAX != 0) {
2685 SourceLen =
StrnLenS (Source, DestMax);
2696 while (*Source !=
'\0') {
2701 ASSERT (*Source < 0x100);
2702 *(Destination++) = (CHAR8)*(Source++);
2705 *Destination =
'\0';
2760 OUT CHAR8 *Destination,
2767 ASSERT (((
UINTN)Source & BIT0) == 0);
2781 if (ASCII_RSIZE_MAX != 0) {
2786 if (RSIZE_MAX != 0) {
2800 SourceLen =
StrnLenS (Source, DestMax);
2801 if (Length >= DestMax) {
2808 if (SourceLen > Length) {
2814 *DestinationLength = 0;
2819 while ((*Source != 0) && (SourceLen > 0)) {
2824 ASSERT (*Source < 0x100);
2825 *(Destination++) = (CHAR8)*(Source++);
2827 (*DestinationLength)++;
2875 OUT CHAR16 *Destination,
2881 ASSERT (((
UINTN)Destination & BIT0) == 0);
2892 if (RSIZE_MAX != 0) {
2896 if (ASCII_RSIZE_MAX != 0) {
2919 while (*Source !=
'\0') {
2920 *(Destination++) = (CHAR16)(UINT8)*(Source++);
2923 *Destination =
'\0';
2975 OUT CHAR16 *Destination,
2982 ASSERT (((
UINTN)Destination & BIT0) == 0);
2996 if (RSIZE_MAX != 0) {
3001 if (ASCII_RSIZE_MAX != 0) {
3016 if (Length >= DestMax) {
3023 if (SourceLen > Length) {
3029 *DestinationLength = 0;
3034 while ((*Source != 0) && (SourceLen > 0)) {
3035 *(Destination++) = (CHAR16)(UINT8)*(Source++);
3037 (*DestinationLength)++;
3097 OUT CHAR8 **EndPointer OPTIONAL,
3099 OUT UINT8 *PrefixLength OPTIONAL
3102 RETURN_STATUS Status;
3106 UINT8 LocalPrefixLength;
3107 CONST CHAR8 *Pointer;
3109 UINTN CompressStart;
3110 BOOLEAN ExpectPrefix;
3112 LocalPrefixLength = MAX_UINT8;
3114 ExpectPrefix =
FALSE;
3122 for (Pointer = String, AddressIndex = 0; AddressIndex <
ARRAY_SIZE (Address->Addr) + 1;) {
3124 if (*Pointer !=
':') {
3142 if ((CompressStart !=
ARRAY_SIZE (Address->Addr)) || (AddressIndex ==
ARRAY_SIZE (Address->Addr))) {
3152 CompressStart = AddressIndex;
3155 if (CompressStart == 0) {
3156 if (*Pointer !=
':') {
3169 if (*Pointer ==
'/') {
3173 if (CompressStart != AddressIndex) {
3180 if (!ExpectPrefix) {
3196 ASSERT (AddressIndex + 1 <
ARRAY_SIZE (Address->Addr));
3197 LocalAddress.Addr[AddressIndex] = (UINT8)((UINT16)Uintn >> 8);
3198 LocalAddress.Addr[AddressIndex + 1] = (UINT8)Uintn;
3205 if (
RETURN_ERROR (Status) || (End == Pointer) || (Uintn > 128)) {
3212 LocalPrefixLength = (UINT8)Uintn;
3221 if (*Pointer ==
'/') {
3222 ExpectPrefix =
TRUE;
3223 }
else if (*Pointer ==
':') {
3224 if (AddressIndex ==
ARRAY_SIZE (Address->Addr)) {
3240 if (((AddressIndex ==
ARRAY_SIZE (Address->Addr)) && (CompressStart !=
ARRAY_SIZE (Address->Addr))) ||
3241 ((AddressIndex !=
ARRAY_SIZE (Address->Addr)) && (CompressStart ==
ARRAY_SIZE (Address->Addr)))
3251 CopyMem (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
3252 ZeroMem (&Address->Addr[CompressStart],
ARRAY_SIZE (Address->Addr) - AddressIndex);
3253 if (AddressIndex > CompressStart) {
3255 &Address->Addr[CompressStart +
ARRAY_SIZE (Address->Addr) - AddressIndex],
3256 &LocalAddress.Addr[CompressStart],
3257 AddressIndex - CompressStart
3261 if (PrefixLength !=
NULL) {
3262 *PrefixLength = LocalPrefixLength;
3265 if (EndPointer !=
NULL) {
3266 *EndPointer = (CHAR8 *)Pointer;
3315 OUT CHAR8 **EndPointer OPTIONAL,
3317 OUT UINT8 *PrefixLength OPTIONAL
3320 RETURN_STATUS Status;
3324 UINT8 LocalPrefixLength;
3327 LocalPrefixLength = MAX_UINT8;
3335 for (Pointer = (CHAR8 *)String, AddressIndex = 0; AddressIndex <
ARRAY_SIZE (Address->Addr) + 1;) {
3351 if (AddressIndex ==
ARRAY_SIZE (Address->Addr)) {
3359 LocalPrefixLength = (UINT8)Uintn;
3364 if (Uintn > MAX_UINT8) {
3368 LocalAddress.Addr[AddressIndex] = (UINT8)Uintn;
3375 if (AddressIndex ==
ARRAY_SIZE (Address->Addr)) {
3376 if (*Pointer ==
'/') {
3388 }
else if (AddressIndex <
ARRAY_SIZE (Address->Addr)) {
3389 if (*Pointer ==
'.') {
3400 if (AddressIndex <
ARRAY_SIZE (Address->Addr)) {
3404 CopyMem (Address, &LocalAddress,
sizeof (*Address));
3405 if (PrefixLength !=
NULL) {
3406 *PrefixLength = LocalPrefixLength;
3409 if (EndPointer !=
NULL) {
3410 *EndPointer = Pointer;
3463 RETURN_STATUS Status;
3475 Status =
AsciiStrHexToBytes (String, 2 *
sizeof (LocalGuid.Data1), (UINT8 *)&LocalGuid.Data1, sizeof (LocalGuid.Data1));
3476 if (
RETURN_ERROR (Status) || (String[2 *
sizeof (LocalGuid.Data1)] !=
'-')) {
3484 String += 2 *
sizeof (LocalGuid.Data1) + 1;
3489 Status =
AsciiStrHexToBytes (String, 2 *
sizeof (LocalGuid.Data2), (UINT8 *)&LocalGuid.Data2, sizeof (LocalGuid.Data2));
3490 if (
RETURN_ERROR (Status) || (String[2 *
sizeof (LocalGuid.Data2)] !=
'-')) {
3498 String += 2 *
sizeof (LocalGuid.Data2) + 1;
3503 Status =
AsciiStrHexToBytes (String, 2 *
sizeof (LocalGuid.Data3), (UINT8 *)&LocalGuid.Data3, sizeof (LocalGuid.Data3));
3504 if (
RETURN_ERROR (Status) || (String[2 *
sizeof (LocalGuid.Data3)] !=
'-')) {
3512 String += 2 *
sizeof (LocalGuid.Data3) + 1;
3522 String += 2 * 2 + 1;
3587 if (ASCII_RSIZE_MAX != 0) {
3604 for (Index = 0; Index < Length; Index++) {
3610 if (Index != Length) {
3617 for (Index = 0; Index < Length; Index++) {
3622 if ((Index & BIT0) == 0) {
CHAR16 EFIAPI CharToUpper(IN CHAR16 Char)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
UINT16 EFIAPI SwapBytes16(IN UINT16 Value)
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI MultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
CHAR8 EFIAPI AsciiCharToUpper(IN CHAR8 Chr)
BOOLEAN EFIAPI InternalAsciiIsDecimalDigitCharacter(IN CHAR8 Char)
BOOLEAN EFIAPI InternalIsDecimalDigitCharacter(IN CHAR16 Char)
BOOLEAN EFIAPI InternalAsciiIsHexaDecimalDigitCharacter(IN CHAR8 Char)
UINTN EFIAPI InternalAsciiHexCharToUintn(IN CHAR8 Char)
UINTN EFIAPI InternalHexCharToUintn(IN CHAR16 Char)
BOOLEAN EFIAPI InternalIsHexaDecimalDigitCharacter(IN CHAR16 Char)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define RETURN_BUFFER_TOO_SMALL
#define RETURN_ERROR(StatusCode)
#define RETURN_ACCESS_DENIED
#define RETURN_UNSUPPORTED
#define ARRAY_SIZE(Array)
#define RETURN_INVALID_PARAMETER
#define RETURN_BAD_BUFFER_SIZE
UINTN EFIAPI AsciiStrnLenS(IN CONST CHAR8 *String, IN UINTN MaxSize)
RETURN_STATUS EFIAPI AsciiStrnCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source, IN UINTN Length)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
BOOLEAN InternalSafeStringNoAsciiStrOverlap(IN CHAR8 *Str1, IN UINTN Size1, IN CHAR8 *Str2, IN UINTN Size2)
RETURN_STATUS EFIAPI AsciiStrHexToUint64S(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINT64 *Data)
RETURN_STATUS EFIAPI AsciiStrCatS(IN OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
RETURN_STATUS EFIAPI StrDecimalToUint64S(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINT64 *Data)
UINTN EFIAPI StrnSizeS(IN CONST CHAR16 *String, IN UINTN MaxSize)
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
RETURN_STATUS EFIAPI StrCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
RETURN_STATUS EFIAPI AsciiStrDecimalToUintnS(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINTN *Data)
RETURN_STATUS EFIAPI AsciiStrHexToUintnS(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINTN *Data)
UINTN EFIAPI StrnLenS(IN CONST CHAR16 *String, IN UINTN MaxSize)
RETURN_STATUS EFIAPI StrToIpv6Address(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT IPv6_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
RETURN_STATUS EFIAPI StrToIpv4Address(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT IPv4_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
RETURN_STATUS EFIAPI AsciiStrDecimalToUint64S(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINT64 *Data)
RETURN_STATUS EFIAPI AsciiStrToGuid(IN CONST CHAR8 *String, OUT GUID *Guid)
RETURN_STATUS EFIAPI StrToGuid(IN CONST CHAR16 *String, OUT GUID *Guid)
RETURN_STATUS EFIAPI AsciiStrToIpv4Address(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT IPv4_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
RETURN_STATUS EFIAPI StrHexToUintnS(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINTN *Data)
UINTN EFIAPI AsciiStrnSizeS(IN CONST CHAR8 *String, IN UINTN MaxSize)
RETURN_STATUS EFIAPI StrHexToBytes(IN CONST CHAR16 *String, IN UINTN Length, OUT UINT8 *Buffer, IN UINTN MaxBufferSize)
RETURN_STATUS EFIAPI AsciiStrToIpv6Address(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT IPv6_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
RETURN_STATUS EFIAPI StrnCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
RETURN_STATUS EFIAPI StrDecimalToUintnS(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINTN *Data)
BOOLEAN InternalSafeStringIsOverlap(IN VOID *Base1, IN UINTN Size1, IN VOID *Base2, IN UINTN Size2)
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
BOOLEAN InternalSafeStringNoStrOverlap(IN CHAR16 *Str1, IN UINTN Size1, IN CHAR16 *Str2, IN UINTN Size2)
RETURN_STATUS EFIAPI StrHexToUint64S(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINT64 *Data)
RETURN_STATUS EFIAPI StrnCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
RETURN_STATUS EFIAPI AsciiStrHexToBytes(IN CONST CHAR8 *String, IN UINTN Length, OUT UINT8 *Buffer, IN UINTN MaxBufferSize)
RETURN_STATUS EFIAPI AsciiStrnCatS(IN OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source, IN UINTN Length)
RETURN_STATUS EFIAPI AsciiStrnToUnicodeStrS(IN CONST CHAR8 *Source, IN UINTN Length, OUT CHAR16 *Destination, IN UINTN DestMax, OUT UINTN *DestinationLength)
RETURN_STATUS EFIAPI UnicodeStrnToAsciiStrS(IN CONST CHAR16 *Source, IN UINTN Length, OUT CHAR8 *Destination, IN UINTN DestMax, OUT UINTN *DestinationLength)
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)