1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-06 21:52:28 +08:00

feat: and Clear and IsEmpty func

This commit is contained in:
dudaodong
2022-02-10 17:41:51 +08:00
parent ade567a620
commit 85e1f711f5
8 changed files with 64 additions and 8 deletions

View File

@@ -55,8 +55,8 @@ func (s *ArrayStack[T]) Peak() (*T, error) {
return &s.data[0], nil
}
// EmptyStack clear the stack data
func (s *ArrayStack[T]) EmptyStack() {
// Clear the stack data
func (s *ArrayStack[T]) Clear() {
s.data = []T{}
s.length = 0
}