discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

String manipulation functions

AD
Ari Diacou
Sat, Oct 10, 2015 7:48 PM

So I want to make a new string that is the first n characters of the old
string

str1="drxenocide"

first(2) str1;

should yield "dr".

My guess was:

function first(n)=[for(i=[0:n-1]){children(0)[i]}];

But it doesn't work, and i'm pretty sure it has multiple problems. Could
someone make this work? Or tell me why it isn't possible?

Now that we have string manipulation, it would be nice if someone could
make all of the excel functions, and put them in a reference file. I COULD
do this, but I am obviously too stupid to do it right now.

Thanks.
--Ari M. Diacou

So I want to make a new string that is the first n characters of the old string str1="drxenocide" first(2) str1; should yield "dr". My guess was: function first(n)=[for(i=[0:n-1]){children(0)[i]}]; But it doesn't work, and i'm pretty sure it has multiple problems. Could someone make this work? Or tell me why it isn't possible? Now that we have string manipulation, it would be nice if someone could make all of the excel functions, and put them in a reference file. I COULD do this, but I am obviously too stupid to do it right now. Thanks. --Ari M. Diacou
TP
Torsten Paul
Sat, Oct 10, 2015 7:51 PM

On 10/10/2015 09:48 PM, Ari Diacou wrote:

Now that we have string manipulation, it would be nice if someone could
make all of the excel functions, and put them in a reference file. I COULD
do this, but I am obviously too stupid to do it right now.

Start with http://www.thingiverse.com/thing:202724 ?

ciao,
Torsten.

On 10/10/2015 09:48 PM, Ari Diacou wrote: > Now that we have string manipulation, it would be nice if someone could > make all of the excel functions, and put them in a reference file. I COULD > do this, but I am obviously too stupid to do it right now. > Start with http://www.thingiverse.com/thing:202724 ? ciao, Torsten.
AD
Ari Diacou
Sat, Oct 10, 2015 7:52 PM

Thanks. I always forget to check Thingiverse.

On Sat, Oct 10, 2015 at 3:51 PM, Torsten Paul Torsten.Paul@gmx.de wrote:

On 10/10/2015 09:48 PM, Ari Diacou wrote:

Now that we have string manipulation, it would be nice if someone could
make all of the excel functions, and put them in a reference file. I

COULD

do this, but I am obviously too stupid to do it right now.

Thanks. I always forget to check Thingiverse. On Sat, Oct 10, 2015 at 3:51 PM, Torsten Paul <Torsten.Paul@gmx.de> wrote: > On 10/10/2015 09:48 PM, Ari Diacou wrote: > > Now that we have string manipulation, it would be nice if someone could > > make all of the excel functions, and put them in a reference file. I > COULD > > do this, but I am obviously too stupid to do it right now. > > > Start with http://www.thingiverse.com/thing:202724 ? > > ciao, > Torsten. > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >