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
I know this is an old thread
I know this is an old thread but you're right about dotnet:
*CORRECT FILENAME*
bga
*CLEAN DUBLE PUNKCTION MARKS*
bga
*FIND AND REPLACE ALL IDENTICLE WORD*
bga
*FIND AND REPLACE FIRST IDENTICLE WORD*
bga
*FILTER NAME NUMBERS*
bga
*CLEAN STRING*
bga
*CAPITALIZE ONLY FIRST LETTERS*
bga
...
In the next few posts I will show some string functions.
Maybe some of them can be useful. Anyway ...
BTW are you trying to recreate Total Commander "Rename Multipe Files" window? :)
bga
I only use the quick search
I only use the quick search did not elaborate on researching your script.
in your case:
I see in your script, the variable of 'trailing_leading' is a boolean, not a string
trimleft/trimright need a string (ie:name of object or any string)
for example to using them
a snippet from mxs help:
or see example from barigazy
regards