银行卡账号格式化

银行卡账号格式化

代码如下(示例):

export const changeAccount = (obj) => {
    
    
	if (obj) {
    
    
		return obj.substr(0, 4) + ' ' + obj.substr(4, 2) + '** ***' + obj.substr(obj.length - 4);
	} else {
    
    
		return obj;
	}

}

猜你喜欢

转载自blog.csdn.net/m0_47791238/article/details/130111948
今日推荐