Page 1 of 1

String Manipulation?

Posted: 04 Feb 2017 14:18
by ForestCat
I've spent an insane amount of time trying to figure this out, twice through the manual and this forum, no luck... Maybe I'm blind.

How can I remove single quotes from a string?
ie ''/ContainerName/TargetName' ---> /ContainerName/TargetName

Thanks for any help.

Re: String Manipulation?

Posted: 08 Feb 2017 04:06
by phase_change
Are you trying to do this using OSC? Because if you are, you can't.

Re: String Manipulation?

Posted: 23 Feb 2017 18:47
by ForestCat
There is NOTHING that I can do, including trying three different email accounts, to have this forum notify me via email of replies to my threads. Sorry, I just found this.

I'd be happy to be able to do it with any type of string. I just want some rudimentary string functions, just like every other Lemur customer has been asking for 5+ years. Oh well.

Re: String Manipulation?

Posted: 24 Feb 2017 14:33
by oldgearguy
in some ways, the data is untyped until you do something with it.
for example, doing the old trick of

decl num = 17;
decl numString;

numString = '' + num;

turns the number 17 into the character string "17"

You can use some of the vector functions found at the end of the manual to subdivide strings up and such, but it's more C-like in that you have a handful of primitives and end up having to write your own useful functions.
I have a bunch for doing things like converting integer seconds into HH:MM:SS strings, for creating hexidecimal strings from integers, etc.

A book/on-line collection of script nuggets would be very beneficial, but the last time it came up, the Liine staff asked the community for the nuggets...

Re: String Manipulation?

Posted: 03 Mar 2017 14:55
by ForestCat
I hear you. I'm trying to avoid reinventing the wheel if possible, but like you, I'm learning to create my own tools as much as possible for these things.
Walk softly and carry a big function library... :-)