diff options
author | Mike Turner <miketur@microsoft.com> | 2019-01-30 16:33:49 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-01-31 20:19:14 +0800 |
commit | 5dbfa01e2ec18a255904c98030b7a18420d4bb85 (patch) | |
tree | e17ff6fcd03bba7bfacecf6801cadce25e2f21a4 /MdePkg/Include | |
parent | cecbecb71d6baad7b55ab59bb9bc7dd7de1efc4b (diff) | |
download | edk2-5dbfa01e2ec18a255904c98030b7a18420d4bb85.tar.gz edk2-5dbfa01e2ec18a255904c98030b7a18420d4bb85.tar.bz2 edk2-5dbfa01e2ec18a255904c98030b7a18420d4bb85.zip |
MdePkg/BaseLib: Introduce CharToUpper and AsciiCharToUpper publicly
Introduce two public functions CharToUpper and AsciiCharToUpper.
They have the same functions as InternalCharToUpper and
InternalBaseLibAsciiToUpper.Considering the internal functions will
be removed,so directly I change their function names to the public ones'.
https://bugzilla.tianocore.org/show_bug.cgi?id=1369
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdePkg/Include')
-rw-r--r-- | MdePkg/Include/Library/BaseLib.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 1eb842384e..c58e4b089d 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -2,7 +2,7 @@ Provides string functions, linked list functions, math functions, synchronization
functions, file path functions, and CPU architecture-specific functions.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -2721,6 +2721,46 @@ AsciiStrnToUnicodeStrS ( );
/**
+ Convert a Unicode character to upper case only if
+ it maps to a valid small-case ASCII character.
+
+ This internal function only deal with Unicode character
+ which maps to a valid small-case ASCII character, i.e.
+ L'a' to L'z'. For other Unicode character, the input character
+ is returned directly.
+
+ @param Char The character to convert.
+
+ @retval LowerCharacter If the Char is with range L'a' to L'z'.
+ @retval Unchanged Otherwise.
+
+**/
+CHAR16
+EFIAPI
+CharToUpper (
+ IN CHAR16 Char
+ );
+
+/**
+ Converts a lowercase Ascii character to upper one.
+
+ If Chr is lowercase Ascii character, then converts it to upper one.
+
+ If Value >= 0xA0, then ASSERT().
+ If (Value & 0x0F) >= 0x0A, then ASSERT().
+
+ @param Chr one Ascii character
+
+ @return The uppercase value of Ascii character
+
+**/
+CHAR8
+EFIAPI
+AsciiCharToUpper (
+ IN CHAR8 Chr
+ );
+
+/**
Converts an 8-bit value to an 8-bit BCD value.
Converts the 8-bit value specified by Value to BCD. The BCD value is
|