Help with the trimleft/trimright function
I've taken my favourite script and tried to learn from it. It's probably is a bit complicated for a beginner but I really wanted to add a function to trim any leading and trailing whitespace characters and also add an option for Title case and Sentence case. I read the manual and all I can see is:
ToLower + ToUpper
Is there another way to achieve Title case and Sentence case?
Any code that I've modified has --------------#### 3dwannab code ###-------------- beside it.
The area that needs attention is:
--------------#### 3dwannab code ###--------------
( if trailing_leading = false then
for i in selection do i.name = trimleft trailing_leading
--------------#### 3dwannab code ###--------------
I'm completely suck at the minute and I wanted to chat with someone on here to help me figure out what I need to do. I've managed to get the presets working as they should. It's just the function that needs a look at.
Thanks
Comments
...
Not have time to look over the whole code.
Post me a snippet to see what is the problem.
Like this
let say i have en string *str*
bga
...
Not quite understand what do you want to achive.
Just show me string before and after (result that you want)
bga
...
Thank you so much.
Your information really helped me a lot!