私は2つの文字列を比較し、重複した値と元の値の両方を取得する必要があります。
chkDuplicateValue関数を呼び出すと、戻り値に複製と元の両方を取得する必要がありますか? は、両方の文字列の区切り文字として機能します。文字列= "テスト、test53" 例アウトプットとして文字列は= "TEST1、TEST2、テスト" 薄暗いNewStrによってすでにとして 薄暗いoldStr:元の値:test1の、TEST2、テストは、値を複製test53:テスト機能の比較asp.net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim oldStr As String = "test1,test2,test"
Dim newStr As String = "test,test53"
Dim refinedString As String = chkDuplicateValue(newStr, oldStr)
'この関数を呼び出すと、戻り値で複製と元の両方を取得する必要がありますか?
Response.Write("Original Value" & refinedString(0))
Response.Write("duplicate Value" & refinedString(1))
'Example out put : Original Value :test1,test2,test,test53 duplicate Value : test
End Sub
Function chkDuplicateValue(ByVal newStr As String, ByVal oldStr As String) As String
Dim duplicate As String = ""
End Function
を参照するには? –
「元の価値」は、ここでは誤称のようです。 – David