Extending TextWidth()

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Extending TextWidth()

Post by Allanon »

Hello :)
If it is possible I'd like to have an additional parameter to exclude from the returned size any formatting tags, I've some custom functions for this job but parsing many strings results in a general slowdown, an inbuilt function could help a lot :)

For example, if I have to manually position a string like this:

Code: Select all

[B][COLOR=$FF0000]Hello World![/COLOR][/B]
I need to get the size of "Hello World!" and not of the entire string, so I've to run a custom function to strip all the formatting tags before getting the size I need.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Extending TextWidth()

Post by airsoftsoftwair »

Have you tried PatternReplaceStr()?
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Extending TextWidth()

Post by Allanon »

I've tried it: it worked great :)
Thanks for the tip!
Post Reply