-
Notifications
You must be signed in to change notification settings - Fork 3k
Use common String utilities #11839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pierregondois
wants to merge
27
commits into
tianocore:master
Choose a base branch
from
pierregondois:pg/string_cleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Use common String utilities #11839
+1,437
−716
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
578817d to
d06b1f6
Compare
Add the following functions to BaseLib: - StrCharIsLowerAlpha () - StrCharIsUpperAlpha () - StrCharIsAlpha () - StrCharIsNum () - StrCharIsHexNum () - StrCharIsUpperHexNum () - StrCharIsAlphaNum () - StrnIsLowerAlpha () - StrnIsUpperAlpha () - StrnIsAlpha () - StrnIsNum () - StrnIsHexNum () - StrnIsUpperHexNum () - StrnIsAlphaNum () Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Replace hard-coded string checks by the new utility functions added to BaseLib. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Replace hard-coded string checks by the new utility functions added to BaseLib. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Replace hard-coded string checks by the new utility functions added to BaseLib. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace VarCheckInternalIsHexaDecimalDigitCharacter() by StrCharIsUpperHexNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace InternalIsDecimalDigitCharacter() by StrCharIsNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace InternalIsHexaDecimalDigitCharacter() by StrCharIsHexNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Replace hard-coded string checks by the new utility functions added to BaseLib. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace IsNumberLetterOnly() by StrnIsAlphaNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace ShellIsHexaDecimalDigitCharacter() by StrCharIsHexNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace ShellIsDecimalDigitCharacter() by StrCharIsNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Add the following functions to BaseLib: - AsciiCharIsLowerAlpha () - AsciiCharIsUpperAlpha () - AsciiCharIsAlpha () - AsciiCharIsNum () - AsciiCharIsHexNum () - AsciiCharIsUpperHexNum () - AsciiCharIsAlphaNum () - AsciiStrnIsLowerAlpha () - AsciiStrnIsUpperAlpha () - AsciiStrnIsAlpha () - AsciiStrnIsNum () - AsciiStrnIsHexNum () - AsciiStrnIsUpperHexNum () - AsciiStrnIsAlphaNum () Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace ToUpper() by CharToUpper(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
d06b1f6 to
6595952
Compare
Replace hard-coded string checks by the new utility functions added to BaseLib. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace the macros defined in NetLib.h by the appropriate equivalent. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Replace hard-coded string checks by the new utility functions added to BaseLib. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace InternalAsciiIsDecimalDigitCharacter() by AsciiCharIsNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace InternalAsciiIsHexaDecimalDigitCharacter() by AsciiCharIsHexNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace IsAlnum() by AsciiCharIsAlphaNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
6595952 to
4fee099
Compare
os-d
approved these changes
Dec 4, 2025
Contributor
os-d
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved for EmulatorPkg and FatPkg.
With the newly added string function to BaseLib, replace IsValidDigitalChar() by: - AsciiStrnIsNum() - AsciiCharIsHexNum() Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Add the following string/char conversion functions: - AsciiCharToUpper () - AsciiCharToLower () - CharToLower () - StrnCharToUpper () - StrnCharToLower () CharToUpper() and AsciiCharToUpper() are just moved String.c. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Replace hard-coded string checks by the new utility functions added to BaseLib. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace UpperCaseString() by StrnCharToUpper(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace UpperCaseString() by StrnCharToUpper(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace LibToLowerString() by StrnCharToLower(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace VarCheckUefiIsHexaDecimalDigitCharacter() by StrCharIsUpperHexNum(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
With the newly added string function to BaseLib, replace ToLower() by StrnCharToLower(). Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
4fee099 to
647950f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The edk2 repository contains multiple local implementations of string utilities:
Add string/char utilities to BaseLib and remove some of the local implementations.
Not all implementations have been replaced, but this is a first step.