code: @Nonnegative
    public static int getLeadingWhitespaceCount (@Nullable final String s)
    {
      int ret = 0;
      if (s != null)
      {
        final int nMax = s.length ();
        while (ret < nMax && Character.isWhitespace (s.charAt (ret)))
          ++ret;
      }
      return ret;
    }
docs: Get the number of leading white spaces according to
  {@link Character#isWhitespace(char)}
  
  @param s
  The string to be parsed. May be <code>null</code>.
  @return Always &ge; 0.