Comes Javascript string of the form "⚡this is the Text", as in the code to set the first character to search for it in the box?

Comes Javascript string of the form "⚡this is the Text", as in the code to set the first character to search for it in the box?

indexOf("⚡") doesn't work, tell me what to do?
March 12th 20 at 08:05
2 answers
March 12th 20 at 08:07
Solution
U+26A1
What is it and where? - marc.Windler commented on March 12th 20 at 08:10
@marc.Windler, https://www.compart.com/en/unicode/U+26A1 this Unicode symbol - Brett.Rempel commented on March 12th 20 at 08:13
@Brett.Rempel, worked, thanks - marc.Windler commented on March 12th 20 at 08:16
@marc.Windler, use something like var some = '\u26A1' - Brett.Rempel commented on March 12th 20 at 08:19
March 12th 20 at 08:09
And who prevents to insert the symbol? JavaScript Unicode understands perfectly.
> > > "⚡This text".match( "⚡" );
Array ["⚡"]

> > > "⚡This text".indexOf( "⚡" );
0

Find more questions by tags UnicodeCharacter encodingJavaScript