Skip to content

Add generic array reverse function #37

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

Closed
delphidabbler opened this issue Jan 6, 2025 · 2 comments
Closed

Add generic array reverse function #37

delphidabbler opened this issue Jan 6, 2025 · 2 comments
Assignees
Labels
completed Issue completed and committed to develop. To be closed on next release enhancement New feature or request

Comments

@delphidabbler
Copy link
Owner

Add new Reverse<T> function to TArrayUtils that returns a copy of a given array with elements reversed in order.

E.g. TArrayUtils.Reverse<Integer>(TBytes.Create(1,2,3)) will return array with contents [3,2,1].

@delphidabbler delphidabbler self-assigned this Jan 6, 2025
@delphidabbler delphidabbler added enhancement New feature or request accepted Issue will be actioned labels Jan 6, 2025
@github-project-automation github-project-automation bot moved this to Considering in Code Snippets Jan 6, 2025
@delphidabbler delphidabbler moved this from Considering to Accepted in Code Snippets Jan 6, 2025
@delphidabbler delphidabbler added the in progress Work has started on this issue label Jan 6, 2025
@delphidabbler
Copy link
Owner Author

Also add a TBytes specific stand-alone function that reverses a byte array: ReverseByteArray.

@delphidabbler
Copy link
Owner Author

Both TArrayUtils.Reverse<T> and ReverseByteArray were added, along with unit tests for both by merge commit a19dc9e.

Also added test for ByteArraysEqual that was required to test ReverseByteArray.

@delphidabbler delphidabbler added completed Issue completed and committed to develop. To be closed on next release and removed accepted Issue will be actioned in progress Work has started on this issue labels Jan 7, 2025
@delphidabbler delphidabbler moved this from Accepted to Completed in Code Snippets Jan 7, 2025
@delphidabbler delphidabbler added this to the Next Release milestone Jan 7, 2025
@delphidabbler delphidabbler removed this from the Next Release milestone Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed Issue completed and committed to develop. To be closed on next release enhancement New feature or request
Projects
Status: Completed
Development

No branches or pull requests

1 participant