/** @file\r
Base Print Library instance implementation.\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
{\r
return BasePrintLibConvertValueToString (Buffer, Flags, Value, Width, 1);\r
}\r
+\r
+/**\r
+ Returns the number of characters that would be produced by if the formatted \r
+ output were produced not including the Null-terminator.\r
+\r
+ If FormatString is NULL, then ASSERT().\r
+ If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
+\r
+ @param[in] FormatString A Null-terminated Unicode format string.\r
+ @param[in] Marker VA_LIST marker for the variable argument list.\r
+\r
+ @return The number of characters that would be produced, not including the \r
+ Null-terminator.\r
+**/\r
+UINTN\r
+EFIAPI\r
+SPrintLength (\r
+ IN CONST CHAR16 *FormatString,\r
+ IN VA_LIST Marker\r
+ )\r
+{\r
+ ASSERT(FormatString != NULL);\r
+ ASSERT_UNICODE_BUFFER (FormatString);\r
+ return BasePrintLibSPrintMarker (NULL, 0, FORMAT_UNICODE | OUTPUT_UNICODE | COUNT_ONLY_NO_PRINT, (CHAR8 *)FormatString, Marker, NULL);\r
+}\r
+\r
+/**\r
+ Returns the number of characters that would be produced by if the formatted \r
+ output were produced not including the Null-terminator.\r
+\r
+ If FormatString is NULL, then ASSERT().\r
+\r
+ @param[in] FormatString A Null-terminated ASCII format string.\r
+ @param[in] Marker VA_LIST marker for the variable argument list.\r
+\r
+ @return The number of characters that would be produced, not including the \r
+ Null-terminator.\r
+**/\r
+UINTN\r
+EFIAPI\r
+SPrintLengthAsciiFormat (\r
+ IN CONST CHAR8 *FormatString,\r
+ IN VA_LIST Marker\r
+ )\r
+{\r
+ ASSERT(FormatString != NULL);\r
+ return BasePrintLibSPrintMarker (NULL, 0, OUTPUT_UNICODE | COUNT_ONLY_NO_PRINT, (CHAR8 *)FormatString, Marker, NULL);\r
+}\r