zoukankan
html css js c++ java
C#自己编写的一个函数 可以删除字符串中指定开头和结尾中间的字符串
private
string
delstr(
string
theoldstr,
string
startstr,
string
endstr)
{
string
teststr
=
theoldstr;
int
StartPosition
=
teststr.IndexOf(startstr);
int
EndPosition
=
teststr.IndexOf(endstr);
int
DelLength
=
EndPosition
-
StartPosition
+
endstr.Length;
teststr
=
teststr.Remove(StartPosition,DelLength);
if
(teststr.IndexOf(startstr)
>=
0
&&
teststr.IndexOf(endstr)
>=
0
)
{
return
delstr(teststr,startstr,endstr);
}
else
{
return
teststr;
}
}
查看全文
相关阅读:
XDOJ1156: 等待队列
XDOJ 1009: Josephus环的复仇
cookie浏览器编写测试无效???
express框架中cookie的使用
JS设置Cookie过期时间
CSS 伪元素
art-template手动编写时间过滤器
mongoose设置默认值、模块化及性能测试
Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify
mongoose 联表查询之populate使用及注意事项
原文地址:https://www.cnblogs.com/chinatefl/p/135948.html
最新文章
bzoj1196[HNOI2006]公路修建问题
2014.6.14模拟赛【bzoj1592】[Usaco2008 Feb]Making the Grade 路面修整
小马哥的超级盐水
欧拉项目第五题
POj 2549 sumsets
poj 3977 子集
Codeforces Round #482 (Div. 2) B、Treasure Hunt(模拟+贪心)979B
最长上升子序列
最大子矩阵和
最大子段和
热门文章
混合背包
多重背包及其优化
一月17日新生冬季练习赛解题报告B.函数问题
一月17日新生冬季练习赛解题报告 A.小Q的生日
POJ 3264Balanced Lineup
ZOJ 1610Count the Colors
HDU 1698Just a Hook
HDU 2795Billboard
HDU 1556Color the ball
POJ 2299Ultra-QuickSort
Copyright © 2011-2022 走看看