Advertisement
connor12568

Untitled

Nov 15th, 2021 (edited)
1,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. public static bool checkLetter(string input1, string input2)
  2.         {
  3.             int x = 0;
  4.             int z = 0;
  5.             if (input1 == string.Empty || input2 == string.Empty)
  6.             {
  7.                 return false;
  8.             }
  9.             while (true)
  10.             {
  11.                 if (z < input2.Length)
  12.                 {
  13.                     z++;
  14.                     if (z >= input2.Length)
  15.                     {
  16.                         z = 0;
  17.                         x++;
  18.                         if (x >= input1.Length)
  19.                             return false;
  20.                     }
  21.                 }
  22.                    
  23.                 if (input1[x] == input2[z])
  24.                     return true;
  25.             }
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement