以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  删除指定字符后的内容  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=58495)

--  作者:tujiu
--  发布时间:2014/10/17 15:46:00
--  删除指定字符后的内容
我想删除指定字符后面的所有字符,包括指定字符在内。用什么方法?
--  作者:有点甜
--  发布时间:2014/10/17 15:48:00
--  

1、查找出指定字符;

 

2、截取对应字符串

 

http://www.foxtable.com/help/topics/1338.htm

 


--  作者:Bin
--  发布时间:2014/10/17 15:49:00
--  
Dim Str1 As String = "中华人民共和国"
Output.Show(str1.substring(0,Str1.IndexOf("人民")))