Doonline
(Doonlinejob23)
June 17, 2022, 4:43am
1
Hii, Please help ASAP!!!
I have a sentence one sentence in one variable: var_string=“A high marks is Milestone”
and i have one more variable Var2_string=“Milestone”
I want to check whether value of Var2_string is present in var_string or not.
I used in if condition
var_string.contains(Var2_string)
but I am getting false result
Please help
Hi @Doonline
Try Var_String.ToString.Contains(Var2_String)
Thanks
Doonline
(Doonlinejob23)
June 17, 2022, 4:54am
3
Bro, I used that only its not working
Hello @Doonline
I think there may be letters in captial letters. So you have to first convert to upper or lower case and then use contains to resovle the case issue.
var_string.ToUpper.ToString.Contains(Var2_string.ToUpper)
1 Like
Hi ,
Contains is case sensitive.May be you can try
var_string.toUpper.contains(Var2_string.toupper)
Doonline
(Doonlinejob23)
June 17, 2022, 5:10am
6
converted then also getting false result
test.xaml (6.0 KB)
Please check following example
Hi @Doonline ,
if you finding words come from end try below function
st.EndsWith(“Milestone”)
Thanks
Rajkumar
Hi @Doonline ,
This should be a Simple comparison operation using .Contains
method along with .Trim/.ToLower
.
For Deeper understanding of the situation, you could check by performing a Debug or using a Write Line
Activity on the string values and observing it’s data there.
system
(system)
Closed
June 20, 2022, 5:33am
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.