PeekBool returns the Nth item on the stack as a bool without removing it.
(idx int32)
| 128 | |
| 129 | // PeekBool returns the Nth item on the stack as a bool without removing it. |
| 130 | func (s *stack) PeekBool(idx int32) (bool, error) { |
| 131 | so, err := s.PeekByteArray(idx) |
| 132 | if err != nil { |
| 133 | return false, err |
| 134 | } |
| 135 | |
| 136 | return asBool(so), nil |
| 137 | } |
| 138 | |
| 139 | // nipN is an internal function that removes the nth item on the stack and |
| 140 | // returns it. |