当前位置:网站首页>js删除字符串中的子串
js删除字符串中的子串
2022-07-02 14:01:00 【spring-java】
const removeString = (string, separator) => {
//我们分割字符串并使其不带分隔符
const separatedArray = string.split(separator);
//我们用空字符串将splittedArray加入
const separatedString = separatedArray.join("");
return separatedString;
}
const str = removeString('this-is-a-sting', '-');
console.log(str);
边栏推荐
- 隐私计算技术创新及产业实践研讨会:学习
- LeetCode 2. 两数相加
- 机器学习-感知机模型
- 【云原生】简单谈谈海量数据采集组件Flume的理解
- Take you ten days to easily complete the go micro service series (I)
- 大厂面试总结大全
- [fluent] dart data type list set type (define set | initialize | generic usage | add elements after initialization | set generation function | set traversal)
- Go zero micro service practical series (VIII. How to handle tens of thousands of order requests per second)
- Global and Chinese markets for airport baggage claim conveyors 2022-2028: technology, participants, trends, market size and share Research Report
- LeetCode 3. Longest substring without duplicate characters
猜你喜欢

Bib | graph representation based on heterogeneous information network learning to predict drug disease association

Go zero micro service practical series (VIII. How to handle tens of thousands of order requests per second)

Which software is good for machine vision?

Understand the key technology of AGV -- the difference between laser slam and visual slam

TCP server communication process (important)

LeetCode 1. 两数之和

机器学习-感知机模型

SSM integration exception handler and project exception handling scheme

流批一体在京东的探索与实践

unity Hub 登錄框變得很窄 無法登錄
随机推荐
R及RStudio下载安装教程(超详细)
数字IC手撕代码--投票表决器
路由模式:hash和history模式
Library management system (Shandong Agricultural University Curriculum Design)
What is normal distribution? What is the 28 law?
渗透工具-内网权限维持-Cobalt strike
Digital IC hand tearing code -- voting device
System Verilog implements priority arbiter
Seal Library - installation and introduction
配置基于接口的ARP表项限制和端口安全(限制用户私自接入傻瓜交换机或非法主机接入)
What is the difference between self attention mechanism and fully connected graph convolution network (GCN)?
电脑管理员权限在哪里可以打开
中国信通院《数据安全产品与服务图谱》,美创科技实现四大板块全覆盖
Yyds dry inventory uses thread safe two-way linked list to realize simple LRU cache simulation
Sim2real environment configuration tutorial
Rock PI Development Notes (II): start with rock PI 4B plus (based on Ruixing micro rk3399) board and make system operation
⌈ 2022 ⌋ how to use webp gracefully in projects
Xiaopeng P7 had an accident on rainy days, and the airbag did not pop up. Official response: the impact strength did not meet the ejection requirements
[fluent] dart data type boolean type (boolean type definition | logical operation)
Written by unity Jason