当前位置:网站首页>JS add spaces to the string
JS add spaces to the string
2022-07-07 11:09:00 【Have a good time I】
js String concatenation space , An old question about growth is often forgotten , Let's make a record
requirement : Because the specification configuration is string splicing , As shown in the figure, the specification configuration is required to add spaces to this character 
I tried several methods, but they didn't work
1. direct +' ' Direct to ignore , No effect .
2. direct +' ' Put... Directly Output , Negative effects .
3. direct +'\xa0', Direct success , If you need a few spaces, just splice a few '\xa0'
The splicing method of the above figure is as follows :
const specificationConfiguration =
' Resource name :' +
conf.resourceName +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' processor :' +
conf.processor +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' Memory :' +
conf.memory +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' computer network :' +
conf.network +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' Free :' +
conf.freeCpus+' nucleus '
边栏推荐
- 2021-04-08
- 【亲测可行】error while loading shared libraries的解决方案
- Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
- Socket socket programming
- uniapp 在onLaunch中跳轉頁面後,點擊事件失效解决方法
- SQL Server 知识汇集9 : 修改数据
- 滚动踩坑--UNI_APP(八)
- Transaction rolled back because it has been marked as rollback-only解决
- PostgreSQL中的表复制
- Network foundation (1)
猜你喜欢

“梦想杯”2017 年江苏省信息与未来小学生夏令营 IT 小能手 PK 之程序设计试题

Deep understanding of Apache Hudi asynchronous indexing mechanism

2021 summary and 2022 outlook

Mendeley -- a free document management tool that automatically inserts references into papers

How much review time does it usually take to take the intermediate soft exam?

Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
![[STM32] actual combat 3.1 - drive 42 stepper motors with STM32 and tb6600 drivers (I)](/img/cd/7cd8e2e77419c65d633a2a235b2362.png)
[STM32] actual combat 3.1 - drive 42 stepper motors with STM32 and tb6600 drivers (I)
![[pro test feasible] error while loading shared libraries solution](/img/e2/688ffa07861f38941cbf2cafdd9939.png)
[pro test feasible] error while loading shared libraries solution

Transaction rolled back because it has been marked as rollback only

Socket socket programming
随机推荐
Process control (creation, termination, waiting, program replacement)
[untitled]
What is an intermediate network engineer? What is the main test and what is the use?
The gun startles the dragon, and the crowd "locks" Zhou Zhi
IDEA快捷键大全
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
Interprocess communication (IPC)
MPX plug-in
從色情直播到直播電商
PostgreSQL中的表复制
Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)
How to prepare for the advanced soft test (network planning designer)?
Simple and easy to modify spring frame components
The sixth training assignment
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
How to successfully pass the senior system architecture designer in the second half of the year?
What does intermediate software evaluator test
Go-Redis 中间件
uniCloud