468,733 Members | 2,278 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,733 developers. It's quick & easy.

String to String Hash function In VB

Hi,

I am looking for a hash function to map string to string
in VB. Could somebody give me some informtion?

Thank you very much.

fk
Nov 20 '05 #1
6 17513
dim t as string. s as string
t="blah blah blah"
s=t.tohash
"Frank King" <fr********@hotmail.com> wrote in message
news:02****************************@phx.gbl...
Hi,

I am looking for a hash function to map string to string
in VB. Could somebody give me some informtion?

Thank you very much.

fk

Nov 20 '05 #2
"Frank King" <fr********@hotmail.com> scripsit:
I am looking for a hash function to map string to string
in VB. Could somebody give me some informtion?


You can use the 'String.GetHashCode' function to get a hash for a
string's. Maybe you should provide more information on what you want to
do with the hash...

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Thank you for your post.

I have a list of string pairs. I use the first string
(in the pair) to find the second string. The second
string is in fact the value of the first string. If I use
an array, it will be very slow to find the value of a
given string. So, I am trying to use hash function to find
the value of a given string variable.
-----Original Message-----
"Frank King" <fr********@hotmail.com> scripsit:
I am looking for a hash function to map string to string
in VB. Could somebody give me some informtion?
You can use the 'String.GetHashCode' function to get a

hash for astring's. Maybe you should provide more information on what you want todo with the hash...

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #4
"Frank King" <fr********@hotmail.com> schrieb:
I have a list of string pairs. I use the first string
(in the pair) to find the second string. The second
string is in fact the value of the first string. If I use
an array, it will be very slow to find the value of a
given string. So, I am trying to use hash function to find
the value of a given string variable.


Have a look at the 'Hashtable' class.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Thank you for the message. I realized that I forgot
to say that I am using VB 6.0. Especially I am using
VBA. Do you have an idea what I should use?

fk

-----Original Message-----
"Frank King" <fr********@hotmail.com> schrieb:
I have a list of string pairs. I use the first string
(in the pair) to find the second string. The second
string is in fact the value of the first string. If I use
an array, it will be very slow to find the value of a
given string. So, I am trying to use hash function to findthe value of a given string variable.


Have a look at the 'Hashtable' class.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #6
"Frank King" <fr********@hotmail.com> schrieb:
Thank you for the message. I realized that I forgot
to say that I am using VB 6.0. Especially I am using
VBA. Do you have an idea what I should use?


This is a VB.NET language group. You will more likely get an answer to your
question if you post it to one of the VB Classic groups
(microsoft.public.vb.*)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Seth | last post: by
6 posts views Thread by Ian Gibbons | last post: by
2 posts views Thread by huey_jiang | last post: by
44 posts views Thread by gokkog | last post: by
9 posts views Thread by Adriano | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.