title: check string is int or double , with extension in swift 3
body: <p>I have string extension you can see under below but only returns true for <strong>Int</strong> , I want to return it true, for All , <strong>Int</strong> and <strong>Double</strong> values only.</p>
  
  <pre><code>extension String  {
      var isnumberordouble : Bool {
          get{
              return self.rangeOfCharacter(from: CharacterSet.decimalDigits.inverted) == nil
          }
      }
  }
  </code></pre>
  
  <p>How can I fix it ? Any idea ? ty.</p>