How can I get string after certain word?
example:“Welcome to World”
From Above i want to get string After Welcome…means how can i use “string after” function in this regard to get result as “to word”
1.Welcome to World --------- ans: “to World”
2.Welcome to Home -------- ans:“to Home”
3.Hello!,Welcome to Company ----- ans:“to Company”
can anyone help me in this regard?
Dim str As String = “Welcome to World”
Dim findstr As String = “Welcome”
If str.Contains(findstr) = True Then
Dim str1 As String = CStr(str.IndexOf(findstr) + findstr.Length)
Dim output As String = str.Substring(CInt(str1))
End If
if you want to pass the string dynamically,you can use edit arguments to pass variable value changng the code as