zoukankan
html css js c++ java
[代码]通用的以字符串为分隔符的Split方法
static
public
string
[] SplitString(
string
str,
string
separator)
{
string
tmp
=
str;
Hashtable ht
=
new
Hashtable();
int
i
=
0
;
int
pos
=
tmp.IndexOf(separator);
while
(pos
!=
-
1
)
{
ht.Add(i,tmp.Substring(
0
,pos));
tmp
=
tmp.Substring(pos
+
separator.Length);
pos
=
tmp.IndexOf(separator);
i
++
;
}
ht.Add(i,tmp);
string
[] array
=
new
string
[ht.Count];
for
(
int
j
=
0
;j
<
ht.Count;j
++
)
array[j]
=
ht[j].ToString();
return
array;
}
愿一路奔跑不退缩,到目前一直从事.Net的B/S,C/S企业应用研发
查看全文
相关阅读:
Golang 开发环境安装和配置
多测师肖老师__接口测试之cms搭建(27.1)
多测师肖老师__接口测试之fn+f12查看接口(27.2)
认识wpf中binding类型
认识wpf的事件
Jquery对象与Dom对象
AS3编程中的两种常用事件
SQL Server 系统表简介
Winform中ComcoBox控件设置选定项
wpf开篇入门
原文地址:https://www.cnblogs.com/syveen/p/302256.html
最新文章
程序员理念
CSStips
安装grunt及其插件
乔布斯:2005年斯坦福演讲
Apple的优秀程序范例
IOS Soap WebService
lamp技能树
IOS 推送摘要
关联引用(Associative References)为现有类添加变量
<译>IOS 外设编程主题
热门文章
再次写给我们这些浮躁的程序员
dispatch queue demo
字符编码
Seata安装和配置
Eureka原理剖析
SpringCloudAlibaba之Seata
KMP算法详解
SpringBoot集成Redis
布隆过滤器
SpringCloudAlibaba之Sentinel
Copyright © 2011-2022 走看看