How to get first char of a string

Apr 8, 2012 at 3:29pm

How to get first char of a string

Hi.

I am new to max and have no idea how to get the first char of a string of a message. Anybody care to tell me how?

Much appreciated,
Nuno

#62843
Apr 8, 2012 at 3:36pm

[ atoi ] to [ zl slice 1 ]

#226863
Apr 8, 2012 at 3:44pm

Thanks. I managed to make it work, but I have to add an itoa object after to get the char back, instead of the corresponding ASCII value. Isnt’ there an easier way to do this, maybe with the RTC lib?

Thanks once again,
Nuno

#226864
Apr 8, 2012 at 3:49pm

regexp?

– Pasted Max Patch, click to expand. –
#226865
Apr 8, 2012 at 8:59pm

Thanks. That worked very well, to.

#226866

You must be logged in to reply to this topic.