如何删除最后一个逗号 [英] How to remove last comma
问题描述
我是.net的新手。
根据你的指导,我尝试了myString = myString.SubString(0,myString.Length-1);
我也使用str.lastindexof n str.remove,但是使用这个我的gettin字符串为''(B193''''H13'''''H14'')而不是('''B193'',''H13'' ,''H14'')。我的原始字符串是
('''B193'',''H13'',''H14'',)我想删除最后一个逗号。我的代码是---
Dim s1,strpid As String
Dim arr(),arr2()
Dim i As Integer
s1 =请求(PatientIDs)
arr =拆分(s1,":")
对于i = 0到UBound (arr)
arr2 =拆分(arr(i),">")
strpid =("''"& arr2(0) &"''"&",")
Response.Write(strpid)
下一页
Plz repl y。
展开 | 选择 | Wrap | 行号
展开 | 选择 | Wrap | 行号
你可以发布确切的代码部分吗?(检查你在哪里使用。)
Hi,I am new to .net.
As per ur guidance I tried myString = myString.SubString(0,myString.Length-1);
I also used str.lastindexof n str.remove,but by using this I m gettin string as '' (B193 '''' H13 '''' H14 '' ) instead of ('' B193 '','' H13 '','' H14'' ).My original string is
('' B193 '','' H13 '','' H14 '', )I want to remove last comma.My code is ---
Dim s1, strpid As String
Dim arr(), arr2()
Dim i As Integer
s1 = Request("PatientIDs")
arr = Split(s1, ":")
For i = 0 To UBound(arr)
arr2 = Split(arr(i), ">")
strpid = ("''" & arr2(0) & "''" & ",")
Response.Write(strpid)
Next
Plz reply.解决方案Expand|Select|Wrap|Line Numbers
Expand|Select|Wrap|Line Numbers
can you post exact code part?(Check where you are using.)
这篇关于如何删除最后一个逗号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆