1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-11 23:53:12 +00:00
PDP-10.its/doc/_info_/lisp.string
2016-11-30 17:58:42 +01:00

69 lines
3.1 KiB
Plaintext
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;; STRING -*-MODE:LISP;PACKAGE:SI-*- -*-LISP-*-
;;; **************************************************************
;;; *** NIL ***** Functions for CHARACTERs and STRINGs ***********
;;; **************************************************************
;;; ** (C) COPYRIGHT 1980 MASSACHUSETTS INSTITUTE OF TECHNOLOGY **
;;; ****** THIS IS A READ-ONLY FILE! (ALL WRITES RESERVED) *******
;;; **************************************************************
;;; Provides support for NIL string operations under maclisp, with
;;; some functions added for compatibility with LISPM and maclisp.
;;; To read this file in on LISPM, do (PACKAGE-DECLARE * SYSTEM 100)
;;; CHARACTER support:
;;; CHARACTERP,
;;; m *:CHARACTER-TO-FIXNUM, *:FIXNUM-TO-CHARACTER
;;; TO-CHARACTER, TO-CHARACTER-N, DIGITP, DIGITP-N
;;; + CHARACTER, CHAR-EQUAL, CHAR-LESSP,
;;; & |+internal-tilde-macro/|| (can be set onto ~ as readmacro)
;;; STRING support:
;;; STRINGP
;;; m CHAR, RPLACHAR
;;; m STRING-LENGTH, SET-STRING-LENGTH, STRING-SEARCHQ, STRING-BSEARCHQ
;;; TO-STRING, MAKE-STRING, STRING-SUBSEQ, STRING-MISMATCHQ
;;; * CHAR-N, RPLACHAR-N, STRING-FILL, STRING-FILL-N, STRING-REPLACE
;;; * STRING-POSQ, STRING-BPOSQ, STRING-POSQ-N, STRING-BPOSQ-N
;;; * STRING-SKIPQ, STRING-BSKIPQ, STRING-SKIPQ-N, STRING-BSKIPQ-N
;;; +m STRING-EQUAL, STRING-LESSP, STRING-SEARCH, STRING-REVERSE-SEARCH
;;; +m STRING-DOWNCASE, STRING-UPCASE
;;; + GET-PNAME, SUBSTRING, STRING-APPEND, STRING-REVERSE, STRING-NREVERSE
;;; + STRING-TRIM, STRING-LEFT-TRIM, STRING-RIGHT-TRIM
;;; +* CHAR-DOWNCASE, CHAR-UPCASE,
;;; +* STRING-SEARCH-CHAR, STRING-SEARCH-NOT-CHAR,
;;; +* STRING-SEARCH-SET, STRING-SEARCH-NOT-SET
;;; +* STRING-REVERSE-SEARCH-CHAR, STRING-REVERSE-SEARCH-NOT-CHAR,
;;; +* STRING-REVERSE-SEARCH-SET, STRING-REVERSE-SEARCH-NOT-SET
;;; * STRING-EXPLODEN, STRING-PNGET, STRING-PNPUT
;;; & STR/:PURCOPY, STR/:PRINTER, |+internal-doublequote-macro/||
;;; &* STR/:CLEAR-WORDS, STR/:GRAB-PURSEG
;;; (a "m" is for lines whose routines are implemented as both macros and
;;; subrs - macro definition is active only in the compiler)
;;; (a + is for lines whose routines are directly LISPM compatible -
;;; many other such routines can be written using the NIL primitives)
;;; (an * is for lines whose routines have been written in MIDAS -
;;; primarily for speed - and are in the file STRAUX >)
;;; (a & is for lines whose routines are PDP10-specific, and are
;;; primarily for internal support)
;;; (the functions named "...-N" use ascii numerical values for their
;;; arguments which are interpreted as "CHARACTER"s, instead of the
;;; new datatype "CHARACTER" - thus while STRING-POSQ scans for a
;;; particular character in a string, STRING-POSQ-N wants its character
;;; as a fixnum.)
; ---------
;A "STRING" is a 4-hunk, with | 1 | 0 |
; indices as indicated in the ---------
; diagram. | 3 | 2 |
; ---------
; (cxr 0 s) ;ptr to class object for STRINGs
; (cxr 1 s) ;"**SELF-EVAL**"
; (cxr 2 s) ;word-index in STR:ARRAY of first word
; (cxr 3 s) ;length of string, in characters