summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/String.c
AgeCommit message (Collapse)Author
2011-06-28Clarify the requirements for the Destination parameter of UnicodeStrToAsciiStr.jcarsey
signed-off-by:jcarsey Reviewed-by:lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11917 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-16Refine code.sfu5
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10799 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-13Refine code.sfu5
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10793 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-09Fixed K9 scan issues.hhuan13
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10781 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-25Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter
did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10604 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-24Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter
did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10596 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-23Update the copyright notice formathhtian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10405 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-23Fix a bug in MdePkg BaseLib: StrnCat() and AsciiStrnCat() should NULL ↵qhuang8
terminated the final destination string when Length is equal to the length of Source string git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9588 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-23Rename BaseLib internal functions by adding InternalBaseLib.lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8980 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-12Fix the implementation of AsciiStrStr() and StrStr() in MdePkg. If the ↵rsun3
length of SearchString is zero, then String is returned. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8297 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-08Fix bugs in StrStr() and AsciiStrStr().rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8261 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-23update string function comment to clear the semantic meaning.eric_tian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8153 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-07add assertion condition to satisfy the requirement in MdePkg library spec 0.61peric_tian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8033 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-10Remove incorrect assertion. According to spec, it should not assert and ↵qhuang8
should return 0. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7853 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-12Fix some typo.gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7007 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-11Synchronize BaseLib h files to c files.gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6983 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-09Synchronize comment of BaseLib.h and it's implementation to match the Spec.gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6929 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-01Remove NibbleToHexChar() function from BaseLiblgao4
Move IsHexDigit, BufToHexString, HexStringToBuf from BaseLib to MdeModulePkg IfrSupportLib. The reason is: 1) IsHexDigit function provides the logic to check Hex Digit and convert it to Decimal value, which is required by IScsi LUN and HII user input. But this logic is not provided by any functions in MdeLib. So, it can't be deleted. It is moved to IfrSupportLib. 2) BufToHexString function converts a array of buffers to hex string. If the buffer length is less than sizeof (UINT64), it can be directly replaced by UnicodeValueToString(). But HII modules may use BufToHexString to convert the buffers whose length > sizeof (UINT64). For example: .\MdeModulePkg\Universal\HiiDatabaseDxe\ConfigRouting.c line 201, 1148 .\Universal\SetupBrowserDxe\Setup.c line line 1457, 1503 Like this case, it is not easy to use UnicodeValueToString to replace BufToHexString. So, BufToHexString is still kept. Because such usages are in HII modules, this function is moved to IfrSupportLib. 3) HexStringToBuf is moved to IfrSupportLib. The reason is similar to BufToHexString. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6782 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-25Synchronize function comment in MdePkg\Library\BaseLib.h with the instance ↵gikidy
of this functions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6718 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-05Add two EFI Modifier.qwang12
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6388 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-20Change style of (CONSTANT == Var) to (Var == CONSTANT) for BaseLib/String.c.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6153 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-20removed blank lines to refine source codes.vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6135 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-24Update BaseLib according to code review comments.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5956 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-181. Change 0 == Length style to Length == 0lgao4
2. Clean BasePeCoff library instance, only keep one copy PeCoffLoaderEx.c file for IA32, X64 and IPF arch 3. Clean the confused comments git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5927 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17remove unnecessary comments introduced by tools from MdePkg. The regular ↵vanjeff
express is "//^p//[ ]Include[ ]common[ ]header[ ]file[ ]for[ ]this[ ]module[.]^p//" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5911 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-09Function description in baselib.h is not clear. change it to comply with ↵eric_tian
Doxgen format. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5862 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-25Code Scrub for MdePkg.yshang1
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5567 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-08Code scrub:yshang1
MdePkg/Library/BaseCacheMaintenanceLib MdePkg/Library/BaseDebugLibNull MdePkg/Library/BaseIoLibIntrinsic MdePkg/Library/BaseLib MdePkg/Library/BaseMemoryLib MdePkg/Library/BaseMemoryLibMmx MdePkg/Library/BaseMemoryLibOptDxe MdePkg/Library/BaseMemoryLibOptPei MdePkg/Library/BaseMemoryLibRepStr MdePkg/Library/BaseMemoryLibSse2 MdePkg/Library/BasePeCoffGetEntryPointLib git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5426 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-231) Add BufToHexString, HexStringToBuf and IsHexDigit to BaseLib.qwang12
2) Remove the duplicated functions implementation from the modules that reference these APIs git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5282 6f19259b-4bc3-4df7-8a09-765794883524
2008-04-22Fix typo in comment.klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5108 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-011. Add conformance checking to ensure the input & output string are ↵qhuang8
well-defined. 2. Adjust the return value of UnicodeStrToAsciiStr() & AsciiStrToUnicodeStr () to be the original destination string to follow MdeLib spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4653 6f19259b-4bc3-4df7-8a09-765794883524
2007-07-12Removed MdePkg usage of ModuleName: in file headersAJFISH
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3217 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-29Removed CommonHeader.h generated file from the MdePkg. AJFISH
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2922 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-22Import some basic libraries instances for Mde Packages. vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2704 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-01Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break ↵lhauch
existing builds. Also updated the SPD and FPD files UiNames git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2616 6f19259b-4bc3-4df7-8a09-765794883524
2007-02-13Update all String related functions in BaseLib for this change introduced in ↵qwang12
Mde Library Spec 0.60e: "Updated all functions that take pointers to Unicode strings as parameters to ASSERT() if the pointer is not aligned in a 16-bit boundary." git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2375 6f19259b-4bc3-4df7-8a09-765794883524
2007-02-12Update MDE and EdkModule packages for ICC build with /W4 /WX /Ox switches, ↵xli24
for some latest modifications break it. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2366 6f19259b-4bc3-4df7-8a09-765794883524
2007-02-121) Added BIT0, BIT1, …, BIT63 to the Base Defines qwang12
2) Added MIN() and MAX() macros to the Base Macros 3) Added StrStr(), StrDecimalToUnitn(), StrDecimalToUint64(), StrHexToUintn(), StrHexToUintn64(), UnicodeToAscii(), AsciiStrStr(), AsciiStrDecimalToUnitn(), AsciiStrDecimalToUint64(), AsciiStrHexToUintn(), AsciiStrHexToUintn64(), and AsciiToUnicode() to the Base Library String Functions 4) Added the Base Library Checksum Functions which include CalculateSum8(), CaclculateCheckSum8(), CalculateSum16(), CalculateChecksum16(), CalculateSum32(), CalculateCheckSum32(), CalculateSum64(), CalculateChecksum64(). 5) Added MMIO Buffer functions to the I/O Library including MmioReadBuffer8(), MmioReadBuffer16(), MmioReadBuffer32(), MmioReadBuffer64(), MmioWriteBuffer8(), MmioWriteBuffer16(), MmioWriteBuffer32(), MmioWriteBuffer64(). 6) Changed the parameter name from SizeOfValue to SizeOfBuffer in PcdSetPtr(), PcdSetPtrEx(), PatchPcdSetPtr(), LibPcdSetPtr(), LibPcdSetPtrEx(), LibPatchPcdSetPtr() 7) Added RADIX_HEX flag to the Print Library to support the conversion of values to hexadecimal strings in UnicodeValueToString() and AsciiValueToString() 8) Added EfiGetCurrentTpl() UEFI Library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2363 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-25Make MDE package pass intel IPF compiler with /W4 /WX switched on.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2312 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-191. added functions header for BaseUefiDecompressLivanjeff
2. added some internal functions header for BaseLib 3. added EFIAPI for some internal assembly files declare git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1050 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-08In AsciiStrncmp(), if length=0, should return 0vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@840 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-301.Updated some functions header of BaseLib with new MWG specvanjeff
2.Rollback EnablePaging64.asm git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@669 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-22In before, FixedPcdGetxx macro was defined as global variable, it is wrong. ↵klu2
It should be defined as value directly, and module developer can use it to define length of array. 1) Change macro FixedPcdGetxx to value macro. 2) Change some wrong macro usage in library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@598 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-101. Added AsmCpuidEx() to BaseLibbxing
2. Added DecimalToBcd8() and BcdToDecimal8() to String.c git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@465 6f19259b-4bc3-4df7-8a09-765794883524
2006-05-22Fixed tracker #40bxing
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@227 6f19259b-4bc3-4df7-8a09-765794883524
2006-04-25Fix bug in StrnCpy() and AsciStrnCpy(). It was copying Length - 1 ↵mdkinney
characters instead of Length characters. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@34 6f19259b-4bc3-4df7-8a09-765794883524
2006-04-21Initial import.bbahnsen
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524