unicode - javascript search for bulletpoint using indexOf - Stack Overflow

I have a string that contains several bullet points (•) that I need to access using the javasc

I have a string that contains several bullet points (•) that I need to access using the javascript indexOf method. I tried just indexOf(•) and indexOf(U+2022), the unicode value, and still am having a -1 return value.

How would I access the bullet points within the string using indexOf?

I have a string that contains several bullet points (•) that I need to access using the javascript indexOf method. I tried just indexOf(•) and indexOf(U+2022), the unicode value, and still am having a -1 return value.

How would I access the bullet points within the string using indexOf?

Share Improve this question edited Mar 30, 2012 at 16:05 zzzzBov 179k56 gold badges327 silver badges371 bronze badges asked Mar 30, 2012 at 15:59 MikeMike 7812 gold badges7 silver badges14 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

It looks like you're using the wrong unicode syntax:

someString.indexOf('\u2022');

Also, recheck that you're using the correct unicode value for the bullet within the string.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745275376a4620007.html

相关推荐

  • unicode - javascript search for bulletpoint using indexOf - Stack Overflow

    I have a string that contains several bullet points (•) that I need to access using the javasc

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信