title: Check the length of integer variable
body: <p>Is there a way to check a lenth of integer variable, and if is to long just trim it.
  I hava a field in database that accepts 3 character, lenth is 3.</p>
  
  <p>So is it possible to do like it's done with string variable</p>
  
  <p>example: </p>
  
  <pre><code>cust_ref = cust_ref.Length &gt; 20 ? cust_ref.Substring(0, 19) : cust_ref; 
  </code></pre>
  
  <p>Thanks!</p>