How to get first char of a string

nuno's icon

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

Rob Ramirez's icon

[ atoi ] to [ zl slice 1 ]

nuno's icon

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

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

regexp?

nuno's icon

Thanks. That worked very well, to.