#How can i make string.length() not count the invisible BBCode?

1 messages · Page 1 of 1 (latest)

dawn hawk
#

im doing a dialogue system, and i need to have BBCode for the effect, but the things related to the text display use the .length(), and the simplest BBCode stuff like [b]A[/b] have it count 1 displayed leter, as 8 letters, and a lot of the better effects are way longer.

How can I get the displayed length of the text?

grand arrow
#

get_parsed_text()

#

or get_total_character_count()

#

neither of those functions include the bbcode stuff

dawn hawk
#

whats the difference between parsed and total ?

grand arrow
#

parsed is the text

#

total is a number

dawn hawk
#

oh i get it
so doing get_total_character_count(string)
is like doing get_parsed_text(string).length

grand arrow
#

No, you don't pass in an argument

#

It's a function that you call on the RichTextLabel

#

it will give you the text that belongs to the RichTextLabel