34. Studio字符串分割split用法

Posted on 2016-05-23 14:34  zkx4213  阅读(216)  评论(0编辑  收藏  举报

var v = "1,2,3";

var arr = v.toString().split(",");

备注:最好先toString()转为字符串,不然有些情况下,会报找不到split()方法;

Copyright © 2024 zkx4213
Powered by .NET 9.0 on Kubernetes