generative modeling for Rhino
Hi again y'all,
It there a way of removing a number of characters from the end of a string? I have comma delimited point values in the format of "x,y,z," so I need to remove the comma from the end to make it "x,y,z" .
there is a component for spliting a string into individual charaters. then you could shift list -1 andstring join back together again. if you need i can post a demo later
thanks david, never thought about using the index cull like that
using an f1 component, you could use the formula
x being your list of values in x,y,z, format.
ideally it should include the string length function -1.
cannot remember if is left(x,length(x)-1) or left(x,len(x)-1)
I do like the cull index example!
Just want to say, loving the level of response on this forum. I hope to contribute something back one day!
I've tried both methods, the cull method seems faster computationally, which may be handy to know!
Note that the first time a component runs it will take a long time to complete because it must be compiled first. Try hitting F5 and then look at the real performance.
I refreshed several times, on average the function method was slower.
Not much of a big deal unless you had several several tens of thousands of points though really.