Commit 1a4f345d authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

1.0.0.5: Import character-classes from rpm.

parent e1ef1ed9
Loading
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
(in-package :fare-utils)

(exporting-definitions

(defun ascii-char-p (x)
  (and (characterp x) (<= 0 (char-code x) 127)))

(defun ascii-uppercase-letter-p (x)
  (char<= #\A x #\Z))

(defun ascii-lowercase-letter-p (x)
  (char<= #\a x #\z))

(defun ascii-letter-p (x)
  (or (ascii-uppercase-letter-p x) (ascii-lowercase-letter-p x)))

(defun ascii-digit-p (x)
  (char<= #\0 x #\9))

(defun ascii-alphanumeric-p (x)
  (or (ascii-letter-p x) (ascii-digit-p x)))

(defun ascii-non-alphanumeric-p (x)
  (and (ascii-char-p x) (not (ascii-alphanumeric-p x))))

(defun ascii-alphanumeric-or-underscore-p (x)
  (or (ascii-alphanumeric-p x)
      (eql x #\_)))
); exporting-definitions
+2 −1
Original line number Diff line number Diff line
;;; -*- Mode: Lisp ; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
(defsystem "fare-utils"
  :version "1.0.0.4"
  :version "1.0.0.5"
  :description "Basic functions and macros, interfaces, pure and stateful datastructures"
  :long-description "fare-utils is a small collection of utilities.
It contains a lot of basic everyday functions and macros"
@@ -15,6 +15,7 @@ It contains a lot of basic everyday functions and macros"
    :depends-on ("package")
    :components
    ((:file "utils")
     (:file "character-classes" :depends-on ("utils"))
     (:file "strings" :depends-on ("utils"))
     (:file "symbols" :depends-on ("strings"))
     (:file "macros" :depends-on ("symbols"))
+5 −1
Original line number Diff line number Diff line
@@ -16,7 +16,11 @@
   #:*safe-package* #:*standard-readtable*
   #:+all-chars-base-feature+ ;; #:absolute-pathname-p
   #:accessors-equal-p #:acond #:acond2 #:adjust-size #:aif
   #:aif2 #:alist->hash-table #:association
   #:aif2 #:alist->hash-table
   #:ascii-char-p #:ascii-uppercase-letter-p #:ascii-lowercase-letter-p
   #:ascii-letter-p #:ascii-digit-p #:ascii-alphanumeric-p #:ascii-non-alphanumeric-p
   #:ascii-alphanumeric-or-underscore-p
   #:association
   #:base-char-p #:binary-heap #:binomial-heap #:boolean
   #:cached-size-mixin
   #:check-not-empty