Here are some string functions I wrote calling lisp from maxima.
string_upcase(s):=block(?intern(?string\-upcase(?symbol\-name(s))))$
string_length(s):=block(?length(?symbol\-name(s)) -1)$
substring(s,i,j):=block(
j:min(j,string_length(s)),
?intern(?concatenate(?string,?symbol\-name(""),?subseq(?symbol\-name(s),
i,j+1))))$
Albert Reiner wrote:
> Hi,
>
> the documentation for ATOM
>
> - Function: ATOM (exp)
> is TRUE if exp is atomic (i.e. a number or name) else FALSE.
> ^^^^^^^^^^^^^^^^^^^^^^^
>
> seems to imply that
>
> atom(x)
>
> is equivalent to
>
> symbolp(x) or numberp(x).
>
> Not surprisingly, I also found that strings are atoms (there does not
> seem to be a stringp function, BTW). Are there any other
> possibilities for atoms in Maxima?
>
> Thanks again,
>
> Albert.
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima