Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
String manipulation
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael Abd-El-Malek  
View profile  
 More options Oct 29 1999, 3:00 am
Newsgroups: comp.lang.lisp
From: Michael Abd-El-Malek <mabde...@uwaterloo.ca>
Date: 1999/10/29
Subject: String manipulation
Hi, I'm new to LISP and I have a question I suspect stems from my C-eish
ways!  I have a string
"A + (B+C)*(A'+D)"
I need to be able to have that tokenized.  I want the first level to
include the two elements "A" and "(B+C)*(A'+D)".  And then I want to
split the second string from the the middle multiplication sign etc... I
thought I can achieve this by searching for the "+" and "*", but I
haven't been able to find a string-search function in common-lisp
(something like strstr in C, I think).
Is there such a function that can search strings and give me indexes
based on character positions?  I know that strings are just arrays, but
I couldn't find an array function that will let me access all BUT the
first element (ie I could build my own string manipulation routines).
Any pointers/suggestions would be greatly appreciated!
Thanks,
Michael Abd-El-Malek

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Oct 29 1999, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 1999/10/29
Subject: Re: String manipulation
* Michael Abd-El-Malek
| Is there such a function that can search strings and give me indexes
| based on character positions?

  see the functions SEARCH, FIND, POSITION.  they operate on sequences,
  which forms the supertype of list, vector, array, and string.  you won't
  find all that many functions specific to strings in Common Lisp, because
  most of the time, they're useful to all sorts of sequences.  this also
  means you use SUBSEQ to extract substrings, and COPY-SEQ to copy strings.

#:Erik


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Abd-El-Malek  
View profile  
 More options Oct 29 1999, 3:00 am
Newsgroups: comp.lang.lisp
From: Michael Abd-El-Malek <mabde...@uwaterloo.ca>
Date: 1999/10/29
Subject: Re: String manipulation
Thanks, I now have a lot of experimenting to do with all the tips I've
received!
The LISP community gives great support so far :)
Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »