最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net remove 删除字符串中指定位置的字符串片
时间:2022-06-25 03:08:28 编辑:袖梨 来源:一聚教程网
代码如下 | 复制代码 |
|
实例
Remove()
从指定位置开始删除指定数的字符
代码如下 | 复制代码 |
<% string str1="我是变形金刚的崇拜者之一"; Response.Write(str1.Remove(6,4)); //结果为“我是变形金刚之一” %> |
使用 remove 从 array中移除项目.项目索引自动减1.
在Firefox浏览器中,调用remove时item 参数设置为 undefined 则移除第一个值为undefined的项目. 其它浏览器中,使用undefined值的item参数则没有效果.
下面的这示例展示了 remove 的使用方法.
JavaScript
代码如下 | 复制代码 |
var a = ['a', 'b', 'c', 'd', 'e']; Array.remove(a, 'c'); // 结果返回: "a,b,d,e" document.write(a,""); Array.removeAt(a, 2); // 结果返回//View the results: "a,b,e" document.write(a,""); |
相关文章
- 塞尔达传说王国之泪提马瓦卡神庙怎么过 05-07
- 奇迹暖暖沐光恩典怎么样 05-07
- 奇迹暖暖旧宴恩典怎么玩 05-07
- 以闪亮之名迟夜巡演怎么样 05-07
- Swrv币虚拟货币 05-07
- bzone交易平台 05-07