StrLen

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

StrLen

Post by ilbarbax » Sun Feb 28, 2016 9:43 am

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: 2914
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: StrLen

Post by airsoftsoftwair » Wed Mar 02, 2016 6:22 pm

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