How do you get the length of a string?

后端 未结 10 1558
星月不相逢
星月不相逢 2020-12-12 12:43

How do you get the length of a string in jQuery?

10条回答
  •  执念已碎
    2020-12-12 13:14

    You don't need jquery, just use yourstring.length. See reference here and also here.

    Update:

    To support unicode strings, length need to be computed as following:

    [..."

提交回复
热议问题