By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,950 Members | 1,585 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,950 IT Pros & Developers. It's quick & easy.

String to String Hash function In VB

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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.