title: find if string has slash in front
body: <p>I want to find if a string has "/" in front of it, in my code I get indexof of the string and find out if the character before it has anything, which works but how do I find if it actually is forward slash. here is my code:</p>
  
  <pre><code> string test = "/images/";
  
              if (test.IndexOf(@"images/") - 1 == -1)
              {
  
              }
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Some of my strings may have full url and some may be as above and some may not have / at all hence using index of</p>