title: Splitting string by space, clarification needed
body: <p>I have a method I am trying to test</p>
  
  <pre><code>    public static string BySpace(string s, int position)
      {
          return s.Split()[position];
      }
  </code></pre>
  
  <p>I have a test function around it</p>
  
  <pre><code>    [Theory]
      [InlineData("a  b   c   d")]
      [InlineData(" a  b   c   d")]
      [InlineData("a  b   c   d ")]
      [InlineData("a b c d")]
      [InlineData(" a b c d ")]
      public void TestParseToList(string s)
      {
          Assert.Equal("a", Util.BySpace(s, 0));
          Assert.Equal("b", Util.BySpace(s, 1));
          Assert.Equal("c", Util.BySpace(s, 2));
          Assert.Equal("d", Util.BySpace(s, 3));
      }
  </code></pre>
  
  <p>A bunch of inline data tests fail. As can be seen i am playing with Space &amp; Tab.</p>
  
  <p><strong>Desired effect: Take a string and split it by any white space</strong></p>
  
  <p>What am i missing please? How can I take a string and split it by space</p>
  
  <p>I tried all of the below to no avail</p>
  
  <pre><code>// return s.Split()[position];
  // return s.Split(' ')[position];
  // return s.Split("\\s+")[position];  &lt;----- i had high hopes for this one
  // return s.Split(null)[position];
  // return s.Split(new char[0])[position];
  creturn s.Split(new char[0], StringSplitOptions.RemoveEmptyEntries)[position]);
  </code></pre>