Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Tokens Calculator

Tokens

Function: tokens (<string>)

Function: tokens (<string>, <test>) Returns a list of tokens, which have been extracted from <string>. The tokens are substrings whose characters satisfy a certain test function. If test is not given, <constituent> is used as the default test. {constituent, alphacharp, digitcharp, lowercasep, uppercasep, charp, characterp, alphanumericp} is the set of test functions. (The Lisp-version of tokens is written by Paul Graham. ANSI Common Lisp, 1996, page 67.)

          (%i1) tokens("24 October 2005");
          (%o1)                  [24, October, 2005]
          (%i2) tokens("05-10-24",digitcharp);
          (%o2)                     [05, 10, 24]
          (%i3) map(parse_string,%);
          (%o3)                      [5, 10, 24]

(%o1)                                true
(%i2) 

Tokens Example

Related Examples

tokens

tokens("my jsme");

Calculate

tokens

tokens("my jsme");

Calculate