码迷,mamicode.com
首页 > 其他好文 > 详细

判断字符串的首字母 ---------startsWith

时间:2016-05-27 16:15:42      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

列:

{
                                            xtype : ‘gridcolumn‘,
                                            dataIndex : ‘nrMid3bit‘,
                                            text : ‘Nr.mid‘,//零件号中间3位
                                            renderer: function(value, metaData, record) {//add renpei 20160527
                                                var partNum=record.get("partNum");
                                                if(null != partNum && partNum.length>5){
                                                    if(partNum.startsWith("N") || partNum.startsWith("n")){
                                                        return "N";
                                                    }else{
                                                        value=partNum.substring(3,6);
                                                        return value;
                                                    }
                                                }else{
                                                    return ;
                                                }
                                                
                                            },
                                            stateId:‘QpnGridForQpn_033‘
                                        }

判断字符串的首字母 ---------startsWith

标签:

原文地址:http://www.cnblogs.com/renpei/p/5534739.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!