Mohan S

Mohan S

  • NA
  • 34
  • 38.8k

Compare the string in the inputs

Nov 5 2015 2:17 AM
Hi Guys 
 
input1 = CHN-PUN-1234
input2 = Pune
The requirement is to takeout the first 3 char of input2 and check with city in
input1 is same as input2 first three char
string[] check = input1.Split('-');
if (check[1] == input2.Substring(0, check[1].Length))
return 1;
else
return 0;
 
I have this logic above, could you please help me to modify using the functions.

Answers (1)