Lines Matching +full:ascii +full:. +full:d
2 Provides services to print a formatted string to a buffer. All combinations of
3 Unicode and ASCII strings are supported.
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
9 strings. Many of the output functions use a format string to describe how to
10 format the output of variable arguments. The format string consists of normal
11 text and argument descriptors. There are no restrictions for how the normal
12 text and argument descriptors can be mixed. The following end of line(EOL)
20 This does not follow the ANSI C standard for sprint(). The format of argument
21 descriptors is described below. The ANSI C standard for sprint() has been
22 followed for some of the format types, and has not been followed for others.
23 The exceptions are noted below.
25 %[flags][width][.precision]type
29 - The field is left justified. If not flag is not specified, then the
30 field is right justified.
32 - Prefix a space character to a number. Only valid for types X, x, and d.
34 - Prefix a plus character to a number. Only valid for types X, x, and d.
35 If both space and + are specified, then space is ignored.
37 - Pad with 0 characters to the left of a number. Only valid for types
38 X, x, and d.
40 - Place a comma every 3rd digit of the number. Only valid for type d.
41 If 0 is also specified, then 0 is ignored.
43 - The number being printed is size UINT64. Only valid for types X, x, and d.
44 If this flag is not specified, then the number being printed is size int.
45 - NOTE: All invalid flags are ignored.
51 argument list.
54 the field.
55 - NOTE: If [width] is not specified, then a field width of 0 is assumed.
57 [.precision]:
61 argument list.
64 the field.
65 - NOTE: If [.precision] is not specified, then a precision of 0 is assumed.
70 - Print a %%.
72 - The argument is a Unicode character. ASCII characters can be printed
73 using this type too by making sure bits 8..15 of the argument are set to 0.
75 - The argument is an unsigned hexadecimal number. The characters used are 0..9 and
76 A..F. If the flag 'L' is not specified, then the argument is assumed
77 to be size int. This does not follow ANSI C.
80 zeros. This is equivalent to a format string of "0x". If the flag
81 'L' is not specified, then the argument is assumed to be size int.
82 This does not follow ANSI C.
83 - d
84 - The argument is a signed decimal number. If the flag 'L' is not specified,
85 then the argument is assumed to be size int.
87 - The argument is a unsigned decimal number. If the flag 'L' is not specified,
88 then the argument is assumed to be size int.
91 unsigned hexadecimal number The characters used are 0..9 and A..F.
93 - The argument is a pointer to an ASCII string.
94 This does not follow ANSI C.
96 - The argument is a pointer to a Unicode string.
97 This does not follow ANSI C.
99 - The argument is a pointer to a GUID structure. The GUID is printed
100 in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.
101 This does not follow ANSI C.
103 - The argument is a pointer to an EFI_TIME structure. The time and
106 padded, hh is the hour zero padded, and mm is minutes zero padded.
107 This does not follow ANSI C.
109 - The argument is a RETURN_STATUS value. This value is converted to
110 a string following the table below. This does not follow ANSI C.
178 /// or TIME value.
202 a Null-terminated Unicode format string and a VA_LIST argument list.
204 This function is similar as vsnprintf_s defined in C11.
207 and BufferSize.
208 The Unicode string is produced by parsing the format string specified by FormatString.
210 contents of the format string.
212 the Null-terminator.
214 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
215 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
217 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
218 unmodified and 0 is returned.
219 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
220 unmodified and 0 is returned.
222 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
223 buffer is unmodified and 0 is returned.
226 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
228 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.
231 Unicode string.
232 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
233 @param FormatString A Null-terminated Unicode format string.
234 @param Marker VA_LIST marker for the variable argument list.
237 Null-terminator.
251 a Null-terminated Unicode format string and a BASE_LIST argument list.
254 and BufferSize.
255 The Unicode string is produced by parsing the format string specified by FormatString.
257 contents of the format string.
259 the Null-terminator.
261 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
262 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
264 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
265 unmodified and 0 is returned.
266 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
267 unmodified and 0 is returned.
269 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
270 buffer is unmodified and 0 is returned.
273 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
275 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.
278 Unicode string.
279 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
280 @param FormatString A Null-terminated Unicode format string.
281 @param Marker BASE_LIST marker for the variable argument list.
284 Null-terminator.
298 Unicode format string and variable argument list.
300 This function is similar as snprintf_s defined in C11.
303 and BufferSize.
304 The Unicode string is produced by parsing the format string specified by FormatString.
305 Arguments are pulled from the variable argument list based on the contents of the format string.
307 the Null-terminator.
309 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
310 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
312 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
313 unmodified and 0 is returned.
314 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
315 unmodified and 0 is returned.
317 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
318 buffer is unmodified and 0 is returned.
321 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
323 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.
326 Unicode string.
327 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
328 @param FormatString A Null-terminated Unicode format string.
329 @param ... Variable argument list whose contents are accessed based on the
330 format string specified by FormatString.
333 Null-terminator.
342 ...
347 ASCII format string and a VA_LIST argument list.
349 This function is similar as vsnprintf_s defined in C11.
352 and BufferSize.
353 The Unicode string is produced by parsing the format string specified by FormatString.
355 contents of the format string.
357 the Null-terminator.
359 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
361 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
362 unmodified and 0 is returned.
363 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
364 unmodified and 0 is returned.
366 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
367 buffer is unmodified and 0 is returned.
369 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
370 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
372 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
375 Unicode string.
376 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
377 @param FormatString A Null-terminated ASCII format string.
378 @param Marker VA_LIST marker for the variable argument list.
381 Null-terminator.
395 ASCII format string and a BASE_LIST argument list.
398 and BufferSize.
399 The Unicode string is produced by parsing the format string specified by FormatString.
401 contents of the format string.
403 the Null-terminator.
405 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
407 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
408 unmodified and 0 is returned.
409 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
410 unmodified and 0 is returned.
412 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
413 buffer is unmodified and 0 is returned.
415 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
416 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
418 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
421 Unicode string.
422 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
423 @param FormatString A Null-terminated ASCII format string.
424 @param Marker BASE_LIST marker for the variable argument list.
427 Null-terminator.
441 ASCII format string and variable argument list.
443 This function is similar as snprintf_s defined in C11.
446 and BufferSize.
447 The Unicode string is produced by parsing the format string specified by FormatString.
449 format string.
451 the Null-terminator.
453 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
455 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
456 unmodified and 0 is returned.
457 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
458 unmodified and 0 is returned.
460 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
461 buffer is unmodified and 0 is returned.
463 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
464 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
466 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
469 Unicode string.
470 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
471 @param FormatString A Null-terminated ASCII format string.
472 @param ... Variable argument list whose contents are accessed based on the
473 format string specified by FormatString.
476 Null-terminator.
485 ...
489 Converts a decimal value to a Null-terminated Unicode string.
492 string specified by Buffer containing at most Width characters. No padding of
493 spaces is ever performed. If Width is 0 then a width of
494 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than
495 Width characters, then only the first Width characters are placed in Buffer.
496 Additional conversion parameters are specified in Flags.
498 The Flags bit LEFT_JUSTIFY is always ignored.
499 All conversions are left justified in Buffer.
500 If Width is 0, PREFIX_ZERO is ignored in Flags.
502 commas are inserted every 3rd digit starting from the right.
504 hexadecimal format.
506 Buffer is a '-'.
510 Null-terminator add up to Width characters.
512 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
513 If an error would be returned, then the function will also ASSERT().
516 Null-terminated Unicode string.
518 Null-terminator.
520 zero pad, and commas.
521 @param Value The 64-bit signed value to convert to a string.
523 Buffer, not including the Null-terminator.
525 @retval RETURN_SUCCESS The decimal value is converted.
527 value.
528 @retval RETURN_INVALID_PARAMETER If Buffer is NULL.
532 sizeof (CHAR16) + 1).
533 If unsupported bits are set in Flags.
535 Flags.
536 If Width >= MAXIMUM_VALUE_CHARACTERS.
550 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
551 ASCII format string and a VA_LIST argument list.
553 This function is similar as vsnprintf_s defined in C11.
555 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
556 and BufferSize.
557 The ASCII string is produced by parsing the format string specified by FormatString.
559 the contents of the format string.
560 The number of ASCII characters in the produced output buffer is returned not including
561 the Null-terminator.
563 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
564 unmodified and 0 is returned.
565 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
566 unmodified and 0 is returned.
568 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
569 is unmodified and 0 is returned.
571 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
572 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
574 If BufferSize is 0, then no output buffer is produced and 0 is returned.
577 ASCII string.
578 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
579 @param FormatString A Null-terminated ASCII format string.
580 @param Marker VA_LIST marker for the variable argument list.
582 @return The number of ASCII characters in the produced output buffer not including the
583 Null-terminator.
596 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
597 ASCII format string and a BASE_LIST argument list.
599 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
600 and BufferSize.
601 The ASCII string is produced by parsing the format string specified by FormatString.
603 the contents of the format string.
604 The number of ASCII characters in the produced output buffer is returned not including
605 the Null-terminator.
607 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
608 unmodified and 0 is returned.
609 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
610 unmodified and 0 is returned.
612 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
613 is unmodified and 0 is returned.
615 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
616 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
618 If BufferSize is 0, then no output buffer is produced and 0 is returned.
621 ASCII string.
622 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
623 @param FormatString A Null-terminated ASCII format string.
624 @param Marker BASE_LIST marker for the variable argument list.
626 @return The number of ASCII characters in the produced output buffer not including the
627 Null-terminator.
640 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
641 ASCII format string and variable argument list.
643 This function is similar as snprintf_s defined in C11.
645 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
646 and BufferSize.
647 The ASCII string is produced by parsing the format string specified by FormatString.
649 format string.
650 The number of ASCII characters in the produced output buffer is returned not including
651 the Null-terminator.
653 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
654 unmodified and 0 is returned.
655 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
656 unmodified and 0 is returned.
658 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
659 is unmodified and 0 is returned.
661 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
662 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
664 If BufferSize is 0, then no output buffer is produced and 0 is returned.
667 ASCII string.
668 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
669 @param FormatString A Null-terminated ASCII format string.
670 @param ... Variable argument list whose contents are accessed based on the
671 format string specified by FormatString.
673 @return The number of ASCII characters in the produced output buffer not including the
674 Null-terminator.
683 ...
687 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
688 Unicode format string and a VA_LIST argument list.
690 This function is similar as vsnprintf_s defined in C11.
692 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
693 and BufferSize.
694 The ASCII string is produced by parsing the format string specified by FormatString.
696 the contents of the format string.
697 The number of ASCII characters in the produced output buffer is returned not including
698 the Null-terminator.
700 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
702 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
703 unmodified and 0 is returned.
704 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
705 unmodified and 0 is returned.
707 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
708 is unmodified and 0 is returned.
711 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
713 If BufferSize is 0, then no output buffer is produced and 0 is returned.
716 ASCII string.
717 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
718 @param FormatString A Null-terminated Unicode format string.
719 @param Marker VA_LIST marker for the variable argument list.
721 @return The number of ASCII characters in the produced output buffer not including the
722 Null-terminator.
735 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
736 Unicode format string and a BASE_LIST argument list.
738 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
739 and BufferSize.
740 The ASCII string is produced by parsing the format string specified by FormatString.
742 the contents of the format string.
743 The number of ASCII characters in the produced output buffer is returned not including
744 the Null-terminator.
746 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
748 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
749 unmodified and 0 is returned.
750 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
751 unmodified and 0 is returned.
753 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
754 is unmodified and 0 is returned.
757 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
759 If BufferSize is 0, then no output buffer is produced and 0 is returned.
762 ASCII string.
763 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
764 @param FormatString A Null-terminated Unicode format string.
765 @param Marker BASE_LIST marker for the variable argument list.
767 @return The number of ASCII characters in the produced output buffer not including the
768 Null-terminator.
781 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
782 Unicode format string and variable argument list.
784 This function is similar as snprintf_s defined in C11.
786 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
787 and BufferSize.
788 The ASCII string is produced by parsing the format string specified by FormatString.
790 format string.
791 The number of ASCII characters in the produced output buffer is returned not including
792 the Null-terminator.
794 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
796 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
797 unmodified and 0 is returned.
798 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
799 unmodified and 0 is returned.
801 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
802 is unmodified and 0 is returned.
805 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
807 If BufferSize is 0, then no output buffer is produced and 0 is returned.
810 ASCII string.
811 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
812 @param FormatString A Null-terminated Unicode format string.
813 @param ... Variable argument list whose contents are accessed based on the
814 format string specified by FormatString.
816 @return The number of ASCII characters in the produced output buffer not including the
817 Null-terminator.
826 ...
830 Converts a decimal value to a Null-terminated Ascii string.
832 Converts the decimal number specified by Value to a Null-terminated Ascii
833 string specified by Buffer containing at most Width characters. No padding of
834 spaces is ever performed. If Width is 0 then a width of
835 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than
836 Width characters, then only the first Width characters are placed in Buffer.
837 Additional conversion parameters are specified in Flags.
839 The Flags bit LEFT_JUSTIFY is always ignored.
840 All conversions are left justified in Buffer.
841 If Width is 0, PREFIX_ZERO is ignored in Flags.
843 commas are inserted every 3rd digit starting from the right.
845 hexadecimal format.
847 Buffer is a '-'.
851 Null-terminator add up to Width characters.
853 If an error would be returned, then the function will ASSERT().
856 Null-terminated Ascii string.
858 Null-terminator.
860 zero pad, and commas.
861 @param Value The 64-bit signed value to convert to a string.
862 @param Width The maximum number of Ascii characters to place in
863 Buffer, not including the Null-terminator.
865 @retval RETURN_SUCCESS The decimal value is converted.
867 value.
868 @retval RETURN_INVALID_PARAMETER If Buffer is NULL.
871 PcdMaximumAsciiStringLength.
872 If unsupported bits are set in Flags.
874 Flags.
875 If Width >= MAXIMUM_VALUE_CHARACTERS.
890 output were produced not including the Null-terminator.
892 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
894 If FormatString is NULL, then ASSERT() and 0 is returned.
897 Null-terminator, then ASSERT() and 0 is returned.
899 @param[in] FormatString A Null-terminated Unicode format string.
900 @param[in] Marker VA_LIST marker for the variable argument list.
903 Null-terminator.
914 output were produced not including the Null-terminator.
916 If FormatString is NULL, then ASSERT() and 0 is returned.
918 than PcdMaximumAsciiStringLength Ascii characters not including the
919 Null-terminator, then ASSERT() and 0 is returned.
921 @param[in] FormatString A Null-terminated ASCII format string.
922 @param[in] Marker VA_LIST marker for the variable argument list.
925 Null-terminator.