Skip to content
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

Fix: char-code for *whitespaces* characters #123

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions str.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,21 @@
(defparameter *pad-side* :right
"The side of the string to add padding characters to. Can be one of :right, :left and :center.")

(defvar *whitespaces* (list #\Backspace #\Tab #\Linefeed #\Newline #\Vt #\Page
#\Return #\Space #\Rubout
#+sbcl #\Next-Line #-sbcl (code-char 133)
#+(or abcl gcl lispworks) (code-char 12288) #-(or abcl gcl lispworks) #\Ideographic_space
#+lispworks #\no-break-space #-lispworks #\No-break_space)
"On some implementations, linefeed and newline represent the same character (code).")
(defvar *whitespaces*
(mapcar (function code-char)
(list 8 ;; #\Backspace
9 ;; #\Tab
10 ;; #\Linefeed #\Newline
11 ;; #\Vt
12 ;; #\Page
13 ;; #\Return
32 ;; #\Space
127 ;; #\Rubout
133 ;; #\Next-Line
160 ;; #\No-break_space
12288 ;; #\Ideographic_space
))
"List of whitespace-like characters.")

(defvar +version+ (asdf:component-version (asdf:find-system "str")))

Expand Down