provide as_string() method to return the alphabet characters #264
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.
This PR provides a method to return the characters in the
Alphabet
struct as aString
.At present, there is no provided way to retrieve characters that were used to create the alphabet. One way to accomplish this today, is to capture the output of the
Debug
format and process it manually. Thisas_string()
method will make it easier to do just that. Alternatively, if thesymbols
field of the struct was made public, the onus could be put on the users of the crate to iterate through the array and cast u8 as char.As an alternative to a GH issue, I wanted to provide a PR instead. Please let me know if this suffices.