•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 427,769 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,724 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 2458 | Replies: 0
![]() |
•
•
Join Date: Jun 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hello Expertz
I am using following function to compare two string.But i want to compare String with strings list like:
str1="A"
str2="A,B,C,D"
Please let me how to do this using function.......
Many Thanks
Regards
Raman
I am using following function to compare two string.But i want to compare String with strings list like:
str1="A"
str2="A,B,C,D"
vb Syntax (Toggle Plain Text)
Public Function CompareString(ByVal str1 As String, ByVal str2 As String) As Boolean Dim i As Integer = 0 For i = 0 To str2.Length - str1.Length If str2.Substring(i, str1.Length) = str1 Then Return True End If Next i Return False End Function Function Calling// If CompareString(Session("directoratename"), direcgrp) = True Then flag = 1 Response.Redirect("Client_Menu.aspx?id=" & linkid & "&flag=" & Common.encrypt(flag)) Else flag = 0 Response.Redirect("Client_Menu.aspx?id=" & linkid & "&flag=" & Common.encrypt(flag)) End If
Please let me how to do this using function.......
Many Thanks
Regards
Raman
Last edited by WaltP : Feb 5th, 2007 at 3:18 pm. Reason: Use Code Tags!
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- how to compare a string to null... (C++)
- hi.. string compare (Java)
- Determine if a certain ivalue is in a string (C++)
- How to compare string value (Java)
- Is there a way to tokenize an array of strings (C++)
- Question about comparing a string with a character (C++)
- need info? can't use strcmp/string compare (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: storing a calendar in VB to Oracle
- Next Thread: Need Help


Linear Mode