-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TracepointSpec - expose a Trim method (#64)
TracepointSpec is a class for parsing user-supplied input. The first thing it does is trim leading/trailing whitespace. It provides access to several parsed-out chunks of the input, but does not provide access to this trimmed version of the full input. It seems likely that callers will want access to this trimmed version of the user-supplied input, whether for logging or for error reporting. For example, the tracepoint-collect tool is doing its own trimming. Provide access to the trimming functionality so callers don't have to duplicate it. - Provide a static Trim method that can be used before calling the constructor to access the trimmed version. Useful if we need to allocate storage for the spec string (has to happen before parsing since TracepointSpec is a non-owning view). - Provide a Trimmed field that stores the trimmed string (useful for logging or error messages after calling the constructor).
- Loading branch information
Showing
5 changed files
with
76 additions
and
64 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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