检查字符串的每个字符? [英] Check Each Character of a String?

查看:74
本文介绍了检查字符串的每个字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


检查字符串中每个字符的最佳方法是什么?


对于加密这样的事情,你在哪里检查字符1并用不同的字符替换

..然后检查字符2并将其替换为

不同的字符......等等......直到完成字符串?


谢谢....

Hello,

What is the best way to check each character within a string?

For doing something like encryption, where you check character 1 and replace
it with a different character.. then check character 2 and replace it with a
different character.... etc.... until completing the string?

thanks....

推荐答案

=?Utf-8?B?TVNVVGVjaA ==?=写于2005年7月11日在

microsoft.public.inetserver.asp.general:
=?Utf-8?B?TVNVVGVjaA==?= wrote on 11 jul 2005 in
microsoft.public.inetserver.asp.general:
检查每个角色的最佳方法是什么一个字符串?

为了做加密之类的事情,你检查字符1和
用不同的字符替换它..然后检查字符2并用另一个字符替换它....等......直到完成
字符串?
What is the best way to check each character within a string?

For doing something like encryption, where you check character 1 and
replace it with a different character.. then check character 2 and
replace it with a different character.... etc.... until completing the
string?




vbscript?


myoutput = "


for i = 1 to len(mystring )

myoutput = myoutput& checkReplace(mid(mystring,i,1))

next


-

Evertjan。

荷兰。

(用我的电子邮件地址替换所有带点的十字架)



vbscript?

myoutput=""

for i=1 to len(mystring)
myoutput = myoutput & checkReplace(mid(mystring,i,1))
next

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


MSUTech写道:
MSUTech wrote:
你好,

检查字符串中每个字符的最佳方法是什么?

要做加密之类的事情,你要检查字符1和
用不同的角色替换它..然后检查角色2并用不同的角色替换它......等等......直到完成字符串?

谢谢....
Hello,

What is the best way to check each character within a string?

For doing something like encryption, where you check character 1 and
replace it with a different character.. then check character 2 and
replace it with a different character.... etc.... until completing
the string?

thanks....




最好的方法是使用replace()函数。


在这里获取vbscript文档: http://tinyurl.com/7rk6

Bob Barrows


-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我

不经常检查它。如果您必须离线回复,请删除

NO SPAM



The best way is to use the replace() function.

Get the vbscript documentation here: http://tinyurl.com/7rk6
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"


Bob Barrows [MVP]于2005年7月12日写的

microsoft.public.inetserver.asp.general:
Bob Barrows [MVP] wrote on 12 jul 2005 in
microsoft.public.inetserver.asp.general:
最好的方法是使用replace()函数。
The best way is to use the replace() function.




你不能用replace指定位置()

说第一个A需要成为一个C

第二个A a D $ / $
-

Evertjan。

荷兰。

(用我的电子邮件地址替换所有带点的十字架)



You cannot specify the position with replace()

say the first A needs to become a C
the second A a D
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


这篇关于检查字符串的每个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆