Page 1 of 1
trim string bug?
Posted: 03 Jun 2018, 12:19
by u-double-u
Hi,
I am experiencing a issue, when trying to tim a string from the start.
I feed it an absolute filename (derived from an array) like
D:\directory\moviedirectory\Example.mp4
and try to strip the directoryname fed into it as well from the start, hoping Example.mp4 would be left.
But the result is xample.mp4
It is stripping the first letter or number as well and has been like that in Ventuz5 as well.
Is it me again?
cheers.
Re: trim string bug?
Posted: 04 Jun 2018, 10:44
by Dennis
It is you again, but i got trapped as well
The StringTrim node works differntly than we both expect.
I would expect it will just trim ... remove the stuff i type into the "Start- EndChars" but instead of trimming our "exact" Start-EndChars it will just SEARCH for the Chars UNTIL it reaches a completely different result.
Well... its kinda a special node which is made for guys who are into programming and got this kind of logic.
What YOU and ME always wand is:
A String Expression node and use following Expression: System.IO.Path.GetFileNameWithoutExtension(A)
Here you go, save it, its handy.. xD
Reg
Arts
Dee
Re: trim string bug?
Posted: 04 Jun 2018, 20:07
by u-double-u
thank you once again,
unbelievable....
Re: trim string bug?
Posted: 11 Jun 2018, 07:31
by u-double-u
Wouldnt it make sense to request that „normal people“ functionality as a new feature then? Probalby easier than me becoming a programmer.
Re: trim string bug?
Posted: 11 Jun 2018, 09:47
by Eric_RD
I think the string handling ist quite powerfull in .Net
And I think Ventuz shouldn't start messing around with the "basic .Net feature nodes".
If you have problems understanding some functionality (which of course everybody does when starting to program) you can just google it and within a second you get the result:
Code: Select all
"Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object." [MSDN]
What I would wish for is a better description in the Ventuz Help sometimes... (overall i think the manual is very good)
But in this case
Code: Select all
"This node removes characters from the start and/or end of a text string." [Ventuz Manual]
may lead to misunderstandings.
Also more links to MSDN like in the description of the "Directory" node might be helpful
regards, Eric
Re: trim string bug?
Posted: 11 Jun 2018, 10:07
by Dennis
Thanks for your Feedback.
Will keep this in mind since it may be really misleading.. especially with the string operations...
I admit and i did already: i was trapped myself
reg
Arts
Dee

Re: trim string bug?
Posted: 11 Jun 2018, 20:01
by u-double-u
well, i wouldnt want existing functions to eb messed around with either. Maybe as an additional feature?
cheers