]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Include/Library/BaseLib.h
MdePkg/BaseLib: Add safe string functions [U|A]StrnTo[A|U]StrS
authorHao Wu <hao.a.wu@intel.com>
Tue, 13 Dec 2016 08:00:35 +0000 (16:00 +0800)
committerHao Wu <hao.a.wu@intel.com>
Mon, 9 Jan 2017 05:59:34 +0000 (13:59 +0800)
commit02263214ef20f1577b62f810016dce801aa95b4f
treeb93b29830d4a038e6f5aeede280564eb23c65e02
parentea2e09218647132e62ac07d54ca2ea8a50617cc7
MdePkg/BaseLib: Add safe string functions [U|A]StrnTo[A|U]StrS

Add the following 2 APIs:
UnicodeStrnToAsciiStrS
AsciiStrnToUnicodeStrS

These APIs are used to enhance APIs UnicodeStrToAsciiStrS and
AsciiStrToUnicodeStrS (without 'n' in names) by:
1. Adds an input parameter 'Length' to specify the maximum number of
Ascii/Unicode characters to convert.
2. Adds an output parameter 'DestinationLength' to indicate the number of
Ascii/Unicode characters successfully converted.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseLib/SafeString.c