当前位置:网站首页>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 '
边栏推荐
- 香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
- How much review time does it usually take to take the intermediate soft exam?
- Arduino receives and sends strings
- 【C#】WinForm运行缩放(变糊)的解决方法
- uniCloud
- [OneNote] can't connect to the network and can't sync the problem
- 单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
- 2022.7.5DAY597
- SQL Server knowledge gathering 9: modifying data
- 深入理解Apache Hudi异步索引机制
猜你喜欢
Socket socket programming
CSAPP bomb lab parsing
[recommendation system 02] deepfm, youtubednn, DSSM, MMOE
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
Wallhaven壁纸桌面版
香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
[machine learning 03] Lagrange multiplier method
Basic knowledge of process (orphan, zombie process)
【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘
[OneNote] can't connect to the network and can't sync the problem
随机推荐
July 10, 2022 "five heart public welfare" activity notice + registration entry (two-dimensional code)
CSAPP bomb lab parsing
Use load_ decathlon_ Datalist (Monai) fast loading JSON data
Une fois que l'uniapp a sauté de la page dans onlaunch, cliquez sur Event Failure resolution
TypeScript 接口继承
滚动踩坑--UNI_APP(八)
A simple example of delegate usage
The eighth training assignment
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
Rolling puddle Uni_ App (VIII)
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
China Southern Airlines pa3.1
Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)
verilog设计抢答器【附源码】
在线硬核工具
Mendeley -- a free document management tool that automatically inserts references into papers
2021-04-23
Unity script visualization about layout code
2021-05-21
2022年7月10日“五心公益”活动通知+报名入口(二维码)