#11 2014-09-08 16:23

Elektro
Senior Member
Registered: 2014-05-28
Posts: 73

Re: How to trim a string?

Ouch, I confussed the person! sorry haha too much time without regreting at the forum have confused me, ok I will try to contact Denis, thanks

EDIT: seems that he doesn't provide an email in him profile?, so seems that I only can wait and if he decides to visit and read this post, well ok then tongue

PS: Sorry for my English.

Last edited by Elektro (2014-09-08 16:27)

Offline

#12 2014-09-11 01:45

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: How to trim a string?

Stefan wrote:
Andrew wrote:

I think it would be great if WideDelete() is enhanced so that if index is negative, it'll delete count characters from the end of the string backwards.

Generally yes, always a good improvement to have this functions count from the right end too.

But for the issue in this very thread, how would you automatically determine the need amount for the count argument?
 

I was just making a general suggestion that wasn't specific to this thread's problem, although the thread did prompt me to suggest it.

Offline

#13 2014-09-18 10:24

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,370

Re: How to trim a string?

Sorry for joining in quite late, but I have some good news for you.

In ReNamer v6.0.0.6 Alpha, scope options were added to the Strip rule: Everywhere, Leading, Trailing.

This will allow you to trim certain characters from the beginning or the end of file names.

Offline

#14 2014-09-20 03:46

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: How to trim a string?

den4b wrote:

In ReNamer v6.0.0.6 Alpha, scope options were added to the Strip rule: Everywhere, Leading, Trailing.

This will allow you to trim certain characters from the beginning or the end of file names.

That's quite useful Denis, but what about PascalScript? Is it possible to enhance WideDelete() as I suggested?

Offline

#15 2014-09-25 18:33

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,370

Re: How to trim a string?

Andrew wrote:
Stefan wrote:

There is no good solution to solve this trimming issue right now.
I think, there should be a more general way to TrimLeft and TrimRight as a another CleanUp rule.

I think it would be great if WideDelete() is enhanced so that if index is negative, it'll delete count characters from the end of the string backwards.

I'll be adding a couple of new functions shortly: WideCopyRight, WideDeleteRight, WideTrimChars, WideTrimCharsLeft and WideTrimCharsRight.

Offline

#16 2014-09-27 11:32

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,370

Re: How to trim a string?

den4b wrote:

I'll be adding a couple of new functions shortly: WideCopyRight, WideDeleteRight, WideTrimChars, WideTrimCharsLeft and WideTrimCharsRight.

Added in v6.0.0.9 Alpha, and documented on the Wiki.

Offline

Board footer

Powered by FluxBB