+\r
+/**\r
+ Returns the length of a Null-terminated Unicode string.\r
+\r
+ If String is not aligned on a 16-bit boundary, then ASSERT().\r
+\r
+ @param String A pointer to a Null-terminated Unicode string.\r
+ @param MaxSize The maximum number of Destination Unicode\r
+ char, including terminating null char.\r
+\r
+ @retval 0 If String is NULL.\r
+ @retval MaxSize If there is no null character in the first MaxSize characters of String.\r
+ @return The number of characters that percede the terminating null character.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+StrnLenS (\r
+ IN CONST CHAR16 *String,\r
+ IN UINTN MaxSize\r
+ );\r
+\r
+/**\r
+ Copies the string pointed to by Source (including the terminating null char)\r
+ to the array pointed to by Destination.\r
+\r
+ If Destination is not aligned on a 16-bit boundary, then ASSERT().\r
+ If Source is not aligned on a 16-bit boundary, then ASSERT().\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Unicode string.\r
+ @param DestMax The maximum number of Destination Unicode\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Unicode string.\r
+\r
+ @retval RETURN_SUCCESS String is copied.\r
+ @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than StrLen(Source).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumUnicodeStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumUnicodeStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+StrCpyS (\r
+ OUT CHAR16 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR16 *Source\r
+ );\r
+\r
+/**\r
+ Copies not more than Length successive char from the string pointed to by\r
+ Source to the array pointed to by Destination. If no null char is copied from\r
+ Source, then Destination[Length] is always set to null.\r
+\r
+ If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().\r
+ If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Unicode string.\r
+ @param DestMax The maximum number of Destination Unicode\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Unicode string.\r
+ @param Length The maximum number of Unicode characters to copy.\r
+\r
+ @retval RETURN_SUCCESS String is copied.\r
+ @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than \r
+ MIN(StrLen(Source), Length).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumUnicodeStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumUnicodeStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+StrnCpyS (\r
+ OUT CHAR16 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR16 *Source,\r
+ IN UINTN Length\r
+ );\r
+\r
+/**\r
+ Appends a copy of the string pointed to by Source (including the terminating\r
+ null char) to the end of the string pointed to by Destination.\r
+\r
+ If Destination is not aligned on a 16-bit boundary, then ASSERT().\r
+ If Source is not aligned on a 16-bit boundary, then ASSERT().\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Unicode string.\r
+ @param DestMax The maximum number of Destination Unicode\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Unicode string.\r
+\r
+ @retval RETURN_SUCCESS String is appended.\r
+ @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than \r
+ StrLen(Destination).\r
+ @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT\r
+ greater than StrLen(Source).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumUnicodeStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumUnicodeStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+StrCatS (\r
+ IN OUT CHAR16 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR16 *Source\r
+ );\r
+\r
+/**\r
+ Appends not more than Length successive char from the string pointed to by\r
+ Source to the end of the string pointed to by Destination. If no null char is\r
+ copied from Source, then Destination[StrLen(Destination) + Length] is always\r
+ set to null.\r
+\r
+ If Destination is not aligned on a 16-bit boundary, then ASSERT().\r
+ If Source is not aligned on a 16-bit boundary, then ASSERT().\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Unicode string.\r
+ @param DestMax The maximum number of Destination Unicode\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Unicode string.\r
+ @param Length The maximum number of Unicode characters to copy.\r
+\r
+ @retval RETURN_SUCCESS String is appended.\r
+ @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than\r
+ StrLen(Destination).\r
+ @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT\r
+ greater than MIN(StrLen(Source), Length).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumUnicodeStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumUnicodeStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+StrnCatS (\r
+ IN OUT CHAR16 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR16 *Source,\r
+ IN UINTN Length\r
+ );\r
+\r
+/**\r
+ Returns the length of a Null-terminated Ascii string.\r
+\r
+ @param String A pointer to a Null-terminated Ascii string.\r
+ @param MaxSize The maximum number of Destination Ascii\r
+ char, including terminating null char.\r
+\r
+ @retval 0 If String is NULL.\r
+ @retval MaxSize If there is no null character in the first MaxSize characters of String.\r
+ @return The number of characters that percede the terminating null character.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+AsciiStrnLenS (\r
+ IN CONST CHAR8 *String,\r
+ IN UINTN MaxSize\r
+ );\r
+\r
+/**\r
+ Copies the string pointed to by Source (including the terminating null char)\r
+ to the array pointed to by Destination.\r
+\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Ascii string.\r
+ @param DestMax The maximum number of Destination Ascii\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Ascii string.\r
+\r
+ @retval RETURN_SUCCESS String is copied.\r
+ @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than StrLen(Source).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumAsciiStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumAsciiStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+AsciiStrCpyS (\r
+ OUT CHAR8 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR8 *Source\r
+ );\r
+\r
+/**\r
+ Copies not more than Length successive char from the string pointed to by\r
+ Source to the array pointed to by Destination. If no null char is copied from\r
+ Source, then Destination[Length] is always set to null.\r
+\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Ascii string.\r
+ @param DestMax The maximum number of Destination Ascii\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Ascii string.\r
+ @param Length The maximum number of Ascii characters to copy.\r
+\r
+ @retval RETURN_SUCCESS String is copied.\r
+ @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than \r
+ MIN(StrLen(Source), Length).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumAsciiStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumAsciiStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+AsciiStrnCpyS (\r
+ OUT CHAR8 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR8 *Source,\r
+ IN UINTN Length\r
+ );\r
+\r
+/**\r
+ Appends a copy of the string pointed to by Source (including the terminating\r
+ null char) to the end of the string pointed to by Destination.\r
+\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Ascii string.\r
+ @param DestMax The maximum number of Destination Ascii\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Ascii string.\r
+\r
+ @retval RETURN_SUCCESS String is appended.\r
+ @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than \r
+ StrLen(Destination).\r
+ @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT\r
+ greater than StrLen(Source).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumAsciiStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumAsciiStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+AsciiStrCatS (\r
+ IN OUT CHAR8 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR8 *Source\r
+ );\r
+\r
+/**\r
+ Appends not more than Length successive char from the string pointed to by\r
+ Source to the end of the string pointed to by Destination. If no null char is\r
+ copied from Source, then Destination[StrLen(Destination) + Length] is always\r
+ set to null.\r
+\r
+ If an error would be returned, then the function will also ASSERT().\r
+\r
+ @param Destination A pointer to a Null-terminated Ascii string.\r
+ @param DestMax The maximum number of Destination Ascii\r
+ char, including terminating null char.\r
+ @param Source A pointer to a Null-terminated Ascii string.\r
+ @param Length The maximum number of Ascii characters to copy.\r
+\r
+ @retval RETURN_SUCCESS String is appended.\r
+ @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than\r
+ StrLen(Destination).\r
+ @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT\r
+ greater than MIN(StrLen(Source), Length).\r
+ @retval RETURN_INVALID_PARAMETER If Destination is NULL.\r
+ If Source is NULL.\r
+ If PcdMaximumAsciiStringLength is not zero,\r
+ and DestMax is greater than \r
+ PcdMaximumAsciiStringLength.\r
+ If DestMax is 0.\r
+ @retval RETURN_ACCESS_DENIED If Source and Destination overlap.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+AsciiStrnCatS (\r
+ IN OUT CHAR8 *Destination,\r
+ IN UINTN DestMax,\r
+ IN CONST CHAR8 *Source,\r
+ IN UINTN Length\r
+ );\r
+\r
+\r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r