StrLen

Discuss any general programming issues here
Post Reply
ilbarbax
Posts: 114
Joined: Thu Apr 01, 2010 6:41 pm

StrLen

Post by ilbarbax »

StrLen("Nome:WbHelp") is returning 11
StrLen("[color=#BLUE]Nome:[/color]WBhelp") is returnin 32

I think there should be a flag to consider or ignore the formatting characters.

To avoid that I had to write a recursive function to remove the formatting characters from the string and return the correct length, but I think it something should be fixed.

thanks
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: StrLen

Post by airsoftsoftwair »

Well, StrLen() doesn't have any relation to text formatting so enhancing StrLen() to support this would be very inconsistent. I might, however, extend TextExtent() to support formatting tags and maybe return the number of characters in the string.
Post Reply