Hi,
I have a string where I want to format part of it, basically, change the color of that part inside the display.newText.
Let us take this example to make it clear.
textString = "Hello this is Mike. My name is Mike."
newString = string.gsub( textString, "(Mike)", "{a}Mike{/a}" )
print( newString ) // Hello this is {a}Mike{/a}. My name is {a}Mike{/a}.
local myText = display.newText( newString, 100, 200, native.systemFont, 12 )
myText:setFillColor( 1, 0, 0.5 )
How can I change “Mike” to be a different color?
Any hints are more than appreciated!