#Comparing Text components actual text, ignoring the style

12 messages · Page 1 of 1 (latest)

zealous meadow
#

I am trying to compare just the string in a text component - ignoring styles

e.g. blue 'Hello' should be equal to green 'Hello' in my comparator.

But I can't find a way to get this 'raw' string if you will...

river prawn
#

get the string and compare that

#

use getString

zealous meadow
#

I tried that but for some text it seems to be null

river prawn
#

have checked if the Text is null or empty?

#

debug the code and see

zealous meadow
#

Of course

#

It is the name of an item, when I use get string it returns null

river prawn
#

show your code

zealous meadow
#

Ah I think ive sorted it now

#

I was getting the text component from the wrong place initially

#

Thanks