Trivial question on Lisp. Getting string length

Is there a build-in function in lisp to return the length of a string?
If there isn't what are the ways in getting it?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think the function you want is string-length
klackonsAuthor Commented:
well.. string-length didn't work..
but i managed to find it on the web. The function I was looking for is (length string)
thanx anyway...

However now I have another question and that is can there be a AND/OR condition when defining the condition in the (cond ) function??
I don't see why not - a condition is not limited to a single test, and Lisp is known for its nested structures.  It's been a while since I actually coded in Lisp, though.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

klackonsAuthor Commented:
can u pls show me some examples?
let say i want to have a simple AND condition like:

if (A = 1 and B = 1)
  print (stuff)

how should i code this in clisp?
Tommy KinardCommented:
(strlen string) for acad2000i

The cond function can be used like a case select statement:
     ((= s 1) "Y")
     ((= s 2) "N")
     ((= s 3) "T")
     ((= s 4) "P")

I would need a smple set of data to setup the cond.


>if (A = 1 and B = 1)
>  print (stuff)

((and (equal A 1) (equal B 1)) (print stuff))

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
klackonsAuthor Commented:
thanx callandor for the quick reply, that was what I needed to know..
One last question, does that mean 'OR' will work as well?

meaning: ((or (equal A 1) (equal B 1)) (print stuff))

is possible as well?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.