The bobbin Reference Manual

This is the bobbin Reference Manual, version 1.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 14:44:27 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 bobbin

Simple (word) wrapping utilities for strings.

Author

Steve Losh <>

Home Page

https://docs.stevelosh.com/bobbin/

License

MIT

Version

1.0.1

Dependency

split-sequence (system).

Source

bobbin.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 bobbin/src

Dependency

package.lisp (file).

Source

bobbin.asd.

Parent Component

bobbin (system).

Child Component

main.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 bobbin/bobbin.asd

Source

bobbin.asd.

Parent Component

bobbin (system).

ASDF Systems

bobbin.


4.1.2 bobbin/package.lisp

Source

bobbin.asd.

Parent Component

bobbin (system).

Packages

bobbin.


4.1.3 bobbin/src/main.lisp

Source

bobbin.asd.

Parent Component

src (module).

Public Interface

wrap (function).

Internals

5 Packages

Packages are listed by definition order.


5.1 bobbin

Source

package.lisp.

Use List

common-lisp.

Public Interface

wrap (function).

Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: wrap (string-or-strings width)

Wrap ‘string-or-strings‘ to ‘width‘.

‘string-or-strings‘ can be a string or a list of strings. A list of strings is treated as multiple lines. In either case the string(s) may also contain newlines. All of these linebreaks will be included in the output — wrapping will only add linebreaks, never remove them.

The result with be of the same type as the argument: either a single string (containing newlines) or a list of strings (not containing newlines).

Examples:

(print (wrap (format nil "foo bar baz") 3))
foo
bar
baz

(print (wrap (format nil "foo bar baz") 7))
foo bar
baz

(print (wrap (format nil "foo~%bar baz") 7))
foo
bar baz

(print (wrap ’("foo" "bar baz") 7))
("foo" "bar baz")

(print (wrap ’("foo" "bar baz") 3))
("foo" "bar" "baz")

Package

bobbin.

Source

main.lisp.


6.2 Internals


6.2.1 Ordinary functions

Function: wrap-line (line width)

Wrap the single-line string ‘line‘ to ‘width‘, returning a multi-line string.

Package

bobbin.

Source

main.lisp.

Function: wrap-lines (strings width)

Wrap a list of ‘strings‘ to ‘width‘, returning a list of strings.

Package

bobbin.

Source

main.lisp.

Function: wrap-string (string width)

Wrap a multi-line string, returning a multi-line string.

Package

bobbin.

Source

main.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables