String Manipulation?

Discuss Lemur and share techniques.
Post Reply
ForestCat
Regular
Posts:59
Joined:02 Mar 2012 21:00
String Manipulation?

Post by ForestCat » 04 Feb 2017 14:18

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.

phase_change
Regular
Posts:114
Joined:31 May 2015 18:45
Location:Austin, TX

Re: String Manipulation?

Post by phase_change » 08 Feb 2017 04:06

Are you trying to do this using OSC? Because if you are, you can't.
Have you tried turning it off and on again?

ForestCat
Regular
Posts:59
Joined:02 Mar 2012 21:00

Re: String Manipulation?

Post by ForestCat » 23 Feb 2017 18:47

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.

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: String Manipulation?

Post by oldgearguy » 24 Feb 2017 14:33

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...

ForestCat
Regular
Posts:59
Joined:02 Mar 2012 21:00

Re: String Manipulation?

Post by ForestCat » 03 Mar 2017 14:55

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... :-)

Post Reply