需要帮助进行字符串操作。 [英] need help with a string manipulation.
问题描述
您好,
我正在尝试创建一些动态控件,一旦它们被渲染
我需要保存输入这些动态的信息
fileds。
例如当我创建3个单选按钮动态控件时,我得到这个控件的ID
rdb29OPT0
rdb30OPT1
rdb31OPT2
....
现在我试图操纵上面的字符串,试着从他们那里获得29,30,31的
。有人可以帮助我如何只需要
值29并删除rdbOPT1作为第一个字符串?
提前谢谢
-L
看一下mid"功能。
Ahmed
学习者写道:你好,
我试图创建一些动态控件和一次它们被渲染
我需要保存输入到这些动态
文件中的信息。
例如,当我创建3个单选按钮动态控件时,我得到的ID
这个控件如rdb29OPT0
rdb30OPT1
rdb31OPT2
现在我试图操纵上面的字符串和试着从他们那里得到29,30,31。有人可以帮助我如何仅仅使用
值29并删除第一个字符串的rdbOPT1吗?
提前致谢
-L
" Ahmed" <啊******* @ gmail.com>在消息中写道
news:11 ********************** @ d56g2000cwd.googlegr oups.com ...看看mid。功能。
Ahmed
Learner写道:你好,
我正在尝试创建一些动态控件,一旦它们被渲染
我需要保存输入到这些动态文件中的信息。
例如,当我创建3个单选按钮动态控件时,我得到此控件的ID
为
rdb29OPT0
rdb30OPT1
rdb31OPT2
现在我正在尝试操纵上面的字符串,只是尝试获取
29,30,31来自他们。有人可以帮助我如何仅仅使用
值29并删除第一个字符串的rdbOPT1吗?
提前致谢
-L
没有使用VisualBasic命名空间(我的偏好,不需要)
使用静态(Visual Basic中的Shared)子串方法:
Dim s As String =" rdb290PT0"
Dim n As String = s.Substring(3,2)
HTH
Mythran
好吧可能会有很多值,例如
rdb1234OPT1234!
其中我只需要'rdb''
和''OPT1234'之间的数值'
我是寻找一种可以rdb的方法,以及
从OPT开始的那个词
希望这会给它带来一点内在。
谢谢
-L
Mythran写道:"艾哈迈德" <啊******* @ gmail.com>在消息中写道
新闻:11 ********************** @ d56g2000cwd.googlegr oups.com ...看看mid和mid。功能。
Ahmed
Learner写道:你好,
我正在尝试创建一些动态控件,一旦它们被渲染
我需要保存输入到这些动态文件中的信息。
例如,当我创建3个单选按钮动态控件时,我得到此控件的ID
为
rdb29OPT0
rdb30OPT1
rdb31OPT2
现在我正在尝试操纵上面的字符串,只是尝试获取
29,30,31来自他们。有人可以帮助我如何仅仅使用
值29并删除第一个字符串的rdbOPT1吗?
提前致谢
-L
并且不使用VisualBasic命名空间(我的偏好,不需要)
使用静态(Visual Basic中的Shared)子串方法:
Dim s As String =" rdb290PT0"
Dim n As String = s.Substring(3,2)
HTH
Mythran
Hello,
I am trying to create few dynamic controls and once they are rendered
I need to save the information that was entered into these dynamic
fileds.
For instance when I create 3 radio button dynamic controls I get the ID
of this controls as
rdb29OPT0
rdb30OPT1
rdb31OPT2
....
Now I am trying to manipulate the the above string and just try getting
the 29, 30, 31 from them. Can some one help me with how do I just the
values 29 and remove rdbOPT1 for the first string?
Thanks in advance
-L
Take a look at the "mid" funtion.
Ahmed
Learner wrote:Hello,
I am trying to create few dynamic controls and once they are rendered
I need to save the information that was entered into these dynamic
fileds.
For instance when I create 3 radio button dynamic controls I get the ID
of this controls as
rdb29OPT0
rdb30OPT1
rdb31OPT2
...
Now I am trying to manipulate the the above string and just try getting
the 29, 30, 31 from them. Can some one help me with how do I just the
values 29 and remove rdbOPT1 for the first string?
Thanks in advance
-L
"Ahmed" <ah*******@gmail.com> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com...Take a look at the "mid" funtion.
Ahmed
Learner wrote:Hello,
I am trying to create few dynamic controls and once they are rendered
I need to save the information that was entered into these dynamic
fileds.
For instance when I create 3 radio button dynamic controls I get the ID
of this controls as
rdb29OPT0
rdb30OPT1
rdb31OPT2
...
Now I am trying to manipulate the the above string and just try getting
the 29, 30, 31 from them. Can some one help me with how do I just the
values 29 and remove rdbOPT1 for the first string?
Thanks in advance
-L
And without using the VisualBasic namespace (my preference, not required)
using using the static (Shared in Visual Basic) Substring method:
Dim s As String = "rdb290PT0"
Dim n As String = s.Substring(3, 2)
HTH
Mythran
well there could be many values down the line for instance
rdb1234OPT1234 !
out of which I just need the numerical value that is in between ''rdb''
and ''OPT1234''
I am looking for kind of a method that could rdb and also the word that
starts with OPT
Hope this gives a little inside of it.
Thanks
-L
Mythran wrote:"Ahmed" <ah*******@gmail.com> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com...Take a look at the "mid" funtion.
Ahmed
Learner wrote:Hello,
I am trying to create few dynamic controls and once they are rendered
I need to save the information that was entered into these dynamic
fileds.
For instance when I create 3 radio button dynamic controls I get the ID
of this controls as
rdb29OPT0
rdb30OPT1
rdb31OPT2
...
Now I am trying to manipulate the the above string and just try getting
the 29, 30, 31 from them. Can some one help me with how do I just the
values 29 and remove rdbOPT1 for the first string?
Thanks in advance
-L
And without using the VisualBasic namespace (my preference, not required)
using using the static (Shared in Visual Basic) Substring method:
Dim s As String = "rdb290PT0"
Dim n As String = s.Substring(3, 2)
HTH
Mythran
这篇关于需要帮助进行字符串操作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!