The petit.string-utils Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The petit.string-utils Reference Manual

This is the petit.string-utils Reference Manual, version 0.0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:10:06 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

petit.string-utils

A petit toolbox about string modification.

Package name and its nicknames:

[package name]

PETIT.STRING-UTILS

[package nicknames]

PSU and PETIT.SU

APIs:

[Generic Function] COERCE-STRING

Syntax:

coece-string object => string

Description:

To coerce to CL:STRING from a lisp object.

Default supported types of coercing from:

a string, a character, a symbol, and a number.

Note:

not applied recursively.

How to support for your own types and/or classes:

you can register coercing method for your own types and/or classes.

[Function] STRING-++

Syntax:

coece-string &rest objects => string

Description:

To concatenate given objects to a CL:STRING object.

COERCE-STRING will be applied to each of given objects recursively.

Supported recursive structures:

Non-supported recursive structures:

[Function] STRING-++2

Syntax:

string-++2 pre-object post-object => string

Description:

A binary function version of the STRING-++ for CL:APPLY, CL:FUNCALL and CL:REDUCE.

[Function] HEAD-MATCH-P

Syntax:

head-match-p item whole-string => (or null fixnum)

Description:

HEAD-MATCH-P tests whether the item is same to head part of the whole-string.

When test matched, HEAD-MATCH-P returns the length of item. When test does not matched, HEAD-MATCH-P returns NIL.

[Function] TAIL-MATCH-P

Syntax:

head-match-p item whole-string => (or null fixnum)

Description:

TAIL-MATCH-P tests whether the item is same to tail part of the whole-string.

When test matched, TAIL-MATCH-P returns the matched index (0-based). When test does not matched, TAIL-MATCH-P returns NIL.

[Function] STRING-##

Syntax:

string-## item whole-string => (values CL:STRING modified-or-not-p)

Description:

STRING-## removes item from head part of the whole-string, if matched.

[Function] STRING-%%

Syntax:

string-%% item whole-string => (values CL:STRING modified-or-not-p)

Description:

STRING-%% removes item from tail part of the whole-string, if matched.

Note for the type of arguments for HEAD-MATCH-P, TAIL-MATCH-P, STRING-## and STRING-%%

When the all given arguments are CL:STRING object, these functions jut work as described above.

When the given item is not a CL:STRING object, these functions recursively apply COERCE-STRING to item before testing.

When the given whole-string is not a CL:STRING object, same as item.

Limitation:

Currently, this toolbox does not support any kind of regular expression.

Examples:

> (psu:string-++ "pi" '= pi)
"pi=3.1415926535897932385L0"
> (psu:string-++ #\a "Bc" 'd '(1 2 #(3 4)) 5 6)
"aBcD123456"

> (string-## "foo" "foobarbaz")
"barbaz" ;
t
> (string-%% "baz" "foobarbaz")
"foobar" ;
t
> (string-## "baz" "foobarbaz")
"foobarbaz" ;
nil
> (string-%% "foo" "foobarbaz")
"foobarbaz" ;
nil
> (string-## 3 pi)
".1415926535897932385L0" ;
t

Author:

SUZUKI Shingo (r2.ichimal@gmail.com)

Copyright:

Copyright (C) 2014 SUZUKI Shingo (r2.ichimal@gmail.com)

License:

Under MIT license.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 petit.string-utils

Maintainer

SUZUKI Shingo

Author

SUZUKI Shingo

License

MIT

Description

A petit tool box about string modification

Version

0.0.1

Source

petit.string-utils.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

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


Previous: , Up: Modules   [Contents][Index]

3.1 petit.string-utils/src

Parent

petit.string-utils (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

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


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 petit.string-utils.asd

Location

petit.string-utils.asd

Systems

petit.string-utils (system)

Packages

petit.string-utils-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 petit.string-utils/src/packages.lisp

Parent

src (module)

Location

src/packages.lisp

Packages

petit.string-utils


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 petit.string-utils/src/builder.lisp

Dependency

packages.lisp (file)

Parent

src (module)

Location

src/builder.lisp

Exported Definitions
Internal Definitions

recursive-coerse-string (function)


Previous: , Up: Lisp files   [Contents][Index]

4.1.4 petit.string-utils/src/filter.lisp

Dependency

builder.lisp (file)

Parent

src (module)

Location

src/filter.lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 petit.string-utils-asd

Source

petit.string-utils.asd

Use List

Previous: , Up: Packages   [Contents][Index]

5.2 petit.string-utils

Source

packages.lisp (file)

Nicknames
Use List

common-lisp

Exported Definitions
Internal Definitions

recursive-coerse-string (function)


Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Functions

Function: string-## ITEM WHOLE-STRING
Package

petit.string-utils

Source

filter.lisp (file)

Function: string-%% ITEM WHOLE-STRING
Package

petit.string-utils

Source

filter.lisp (file)

Function: string-++ &rest OBJS
Package

petit.string-utils

Source

builder.lisp (file)

Function: string-++2 PRE POST
Package

petit.string-utils

Source

builder.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Generic functions

Generic Function: coerce-string OBJ
Package

petit.string-utils

Source

builder.lisp (file)

Methods
Method: coerce-string OBJ
Generic Function: head-match-p ITEM WHOLE-STRING
Package

petit.string-utils

Source

filter.lisp (file)

Methods
Method: head-match-p (ITEM string) OBJ
Method: head-match-p OBJ (WHOLE-STRING string)
Method: head-match-p (ITEM string) (WHOLE-STRING string)
Generic Function: tail-match-p ITEM WHOLE-STRING
Package

petit.string-utils

Source

filter.lisp (file)

Methods
Method: tail-match-p (ITEM string) (WHOLE-STRING string)

Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Functions

Function: recursive-coerse-string OBJ
Package

petit.string-utils

Source

builder.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M   P  
Index Entry  Section

F
File, Lisp, petit.string-utils.asd: The petit<dot>string-utils<dot>asd file
File, Lisp, petit.string-utils/src/builder.lisp: The petit<dot>string-utils/src/builder<dot>lisp file
File, Lisp, petit.string-utils/src/filter.lisp: The petit<dot>string-utils/src/filter<dot>lisp file
File, Lisp, petit.string-utils/src/packages.lisp: The petit<dot>string-utils/src/packages<dot>lisp file

L
Lisp File, petit.string-utils.asd: The petit<dot>string-utils<dot>asd file
Lisp File, petit.string-utils/src/builder.lisp: The petit<dot>string-utils/src/builder<dot>lisp file
Lisp File, petit.string-utils/src/filter.lisp: The petit<dot>string-utils/src/filter<dot>lisp file
Lisp File, petit.string-utils/src/packages.lisp: The petit<dot>string-utils/src/packages<dot>lisp file

M
Module, petit.string-utils/src: The petit<dot>string-utils/src module

P
petit.string-utils.asd: The petit<dot>string-utils<dot>asd file
petit.string-utils/src: The petit<dot>string-utils/src module
petit.string-utils/src/builder.lisp: The petit<dot>string-utils/src/builder<dot>lisp file
petit.string-utils/src/filter.lisp: The petit<dot>string-utils/src/filter<dot>lisp file
petit.string-utils/src/packages.lisp: The petit<dot>string-utils/src/packages<dot>lisp file

Jump to:   F   L   M   P  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   F   G   H   M   R   S   T  
Index Entry  Section

C
coerce-string: Exported generic functions
coerce-string: Exported generic functions

F
Function, recursive-coerse-string: Internal functions
Function, string-##: Exported functions
Function, string-%%: Exported functions
Function, string-++: Exported functions
Function, string-++2: Exported functions

G
Generic Function, coerce-string: Exported generic functions
Generic Function, head-match-p: Exported generic functions
Generic Function, tail-match-p: Exported generic functions

H
head-match-p: Exported generic functions
head-match-p: Exported generic functions
head-match-p: Exported generic functions
head-match-p: Exported generic functions

M
Method, coerce-string: Exported generic functions
Method, head-match-p: Exported generic functions
Method, head-match-p: Exported generic functions
Method, head-match-p: Exported generic functions
Method, tail-match-p: Exported generic functions

R
recursive-coerse-string: Internal functions

S
string-##: Exported functions
string-%%: Exported functions
string-++: Exported functions
string-++2: Exported functions

T
tail-match-p: Exported generic functions
tail-match-p: Exported generic functions

Jump to:   C   F   G   H   M   R   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, petit.string-utils: The petit<dot>string-utils package
Package, petit.string-utils-asd: The petit<dot>string-utils-asd package
petit.string-utils: The petit<dot>string-utils system
petit.string-utils: The petit<dot>string-utils package
petit.string-utils-asd: The petit<dot>string-utils-asd package

S
System, petit.string-utils: The petit<dot>string-utils system

Jump to:   P   S