-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
type: featureA value-adding code addition that introduce new functionality.A value-adding code addition that introduce new functionality.vrl: stdlibChanges to the standard libraryChanges to the standard library
Description
A note for the community
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Use Cases
My particular use case is checking bit flags in a string of raw bytes. When #1386 lands, it will add the required comparison functions, but I also need a way to convert a raw byte (a string) into an integer.
Attempted Solutions
No response
Proposal
Add two functions:
ord(value: string, [position: integer])- gives integer representation of the first character in a string (optionally the character at a certain position), this is a workaround for VRL not having a character type.chr(value: integer)- converts an integer into a character, the inverse oford()
These functions should probably be added to the "Convert functions" section.
References
No response
Metadata
Metadata
Assignees
Labels
type: featureA value-adding code addition that introduce new functionality.A value-adding code addition that introduce new functionality.vrl: stdlibChanges to the standard libraryChanges to the standard library