Skip to content

Commit

Permalink
Added from-string that can handle unsigned/signed bytes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirherrbatka committed May 10, 2022
1 parent 6632193 commit 8f9bb60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/implementation.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@
(subseq string start end))


(defmethod from-string (type string start end)
(if (or (subtypep type 'unsigned-byte) (subtypep type 'signed-byte))
(parse-integer string
:start start
:end end)
(call-next-method)))


(defmethod to-string (type value)
(princ-to-string value))

Expand Down

0 comments on commit 8f9bb60

Please sign in to comment.