Variable +LOWER-CASE-ASCII-ALPHABET+ All the lower case letters in 7 bit ASCII.
Variable +UPPER-CASE-ASCII-ALPHABET+ All the upper case letters in 7 bit ASCII.
Variable +ASCII-ALPHABET+ All letters in 7 bit ASCII.
Variable +ALPHANUMERIC-ASCII-ALPHABET+ All the letters and numbers in 7 bit ASCII.
Variable +BASE64-ALPHABET+ All the characters allowed in base64 encoding.
Function RANDOM-STRING Returns a random alphabetic string.
Function STRCAT Returns a fresh string consisting of ITEMS concat'd together.
Function STRCAT* Concatenate all the strings in STRING-DESIGNATORS.
Variable ~% A string containing a single newline
Variable ~T A string containing a single tab character.
Variable +CR-LF+ A string containing the two characters CR and LF.
Function STRING-TO-OCTETS Convert STRING, a list string, a vector of bytes according to ENCODING.
#+(and clisp unicode) (progn (defun encoding-keyword-to-native (encoding) (intern (string encoding) (find-package :charset))) (defun %string-to-octets (string encoding) (ext:convert-string-to-bytes string (encoding-keyword-to-native encoding))) (defun %octets-to-string (octets encoding) (ext:convert-string-from-bytes octets (encoding-keyword-to-native encoding))))
#+(and sbcl sb-unicode) (progn (defun encoding-keyword-to-native (encoding) (ecase encoding (:utf-8 :utf8) (:utf-16 :utf16) (:us-ascii :us-ascii) (t encoding))) (defun %string-to-octets (string encoding) (sb-ext:string-to-octets string :external-format (encoding-keyword-to-native encoding))) (defun %octets-to-string (octets encoding) (sb-ext:octets-to-string octets :external-format (encoding-keyword-to-native encoding))))
#-(or (and sbcl sb-unicode) (and clisp unicode))
(progn (defun %string-to-octets (string encoding) (declare (ignore encoding)) (map-into (make-array (length string) :element-type 'unsigned-byte) #'char-code string)) (defun %octets-to-string (octets encoding) (declare (ignore encoding)) (map-into (make-array (length octets) :element-type 'character) #'code-char octets)))