当前位置:网站首页>js takes the value of a feature at a certain position in the string, such as Huawei=> Huawei
js takes the value of a feature at a certain position in the string, such as Huawei=> Huawei
2022-08-02 03:38:00 【suzhiwei_boke】
let brandName = ' '
if (item.name.indexOf('(') !== -1) {
const index = item.name.lastIndexOf('\(') // Determine if the name has (), if so, remove it
brandName = item.name.substring(0, index)
} else {
brandName = item.name
}
Inspect two knowledge points, the string search indexOf() value is -1, it does not exist
边栏推荐
- String comparison size in MySQL (date string comparison problem)
- L1-043 阅览室 (20分)
- UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the index ing argu
- 第一篇博客
- C语言的变长数组
- require模块化语法
- SOCKS5
- Knowledge Engineering Assignment 2: Introduction to Knowledge Engineering Related Fields
- 枚举法方法:(leetcode1300)转变数组后最接近目标值的数组和
- Source Insight 使用教程(2)——常用功能
猜你喜欢

subprocess.CalledProcessError: Command 'pip install 'thop'' returned non-zero exit status 1.

parser = argparse.ArgumentParser() parsing

语义分割标签即像素值的巨坑,transforms.ToTensor()的错误使用

Phospholipid-polyethylene glycol-targeted neovascularization targeting peptide APRPG, DSPE-PEG-APRPG

我的小笔记 =》原生微信小程序

Deveco studio 鸿蒙app访问网络详细过程(js)

C语言入门小游戏—三子棋

第一篇博客

STM32 map文件解析

磷脂-聚乙二醇-醛基 DSPE-PEG-Aldehyde DSPE-PEG-CHO MW:5000
随机推荐
C语言 void和void *(无类型指针)
kettle 安装与配置
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boo
Source Insight 使用教程(2)——常用功能
磷脂-聚乙二醇-叠氮,DSPE-PEG-Azide,DSPE-PEG-N3,MW:5000
DSPE-PEG-PDP,DSPE-PEG-OPSS,磷脂-聚乙二醇-巯基吡啶供应,MW:5000
ssm various configuration templates
Common methods of js array deduplication
np.isnan ()
利用 nucleo stm32 f767zi 进行USART+DMA+PWM输入模式 CUBE配置
MySQL中JOIN的用法
__dirname
由中序遍历和后序遍历得到前序遍历(树的遍历)
客户评分控件
Phospholipid-polyethylene glycol-thiol, DSPE-PEG-Thiol, DSPE-PEG-SH, MW: 5000
L1-020 帅到没朋友 (20分)
C语言中关于2的n次方求值问题(移位运算)
STM32 CAN过滤器
SOCKS5
Redis简单学习笔记