I already know the string-concat to concat 2 strings, but I need a function
which can copy a small part of a string
(function "this is a string" 1 4) => "this"
where 1 would be the beginning index
and 4 the ending index
It would be a function of the kind
function: string, integer, integer -> string
s, b, e -> substring of s
from indice b to indice e
The parameters can be different, but I need a function that allow me to
extract substring (even a char) from a string
Thank you a lot
--
Dark Skull Software
http://www.dark-skull.fr.st
A+
(subseq "this is a string" 0 4) => "this"
--
Knut Anders
Thank you !!!!!!!!!!
--
Dark Skull Software
http://www.dark-skull.fr.st
Association d'entraide aux développeurs francophones
http://www.developpez.com
A+
"Knut Anders Hatlen" <kaha...@online.no> a écrit dans le message de news:
866677o...@stjernegris.hatlen.net...
>> I already know the string-concat to concat 2 strings, but I need
>> a function which can copy a small part of a string
Knut> (subseq "this is a string" 0 4) => "this"
The original poster would do well to note that this solution uses a
function that applies not specifically to strings, but rather to
sequences.
This is a critical point that often needs to be underscored for folks
only recently enlightened. It seems to come up a lot with strings.
Strings are sequences. When working with the Common Lisp library,
you'll frequently find that there isn't a function that does what you
need on the precise type on which you need it to work (e.g., a string)
but there is one that works on a more general type of which your
specific type is a member (e.g., a sequence).
--
Matt Curtin, Founder Interhack Corporation http://web.interhack.com/
My new book, "Developing Trust: Online Privacy and Security," is now
available. See site for details. research | development | consulting
Ok, thanks you for these precisions
--
Dark Skull Software
http://www.dark-skull.fr.st
A+
"Matt Curtin" <cmcu...@interhack.net> a écrit dans le message de news:
86u1ur2...@rowlf.interhack.net...