Why is “

前端 未结 3 425
你的背包
你的背包 2020-12-06 11:17

How does any textarea in my browser handle a seemingly 2 chars represented as one?

For example:

"         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 11:47

    I believe rpadovani answered your "why" question best, but for an implementation that will get you a proper glyph count in this situation, Lodash has tacked this problem in their toArray module.

    For example,

    _.toArray('12

提交回复
热议问题