title: String format numbers to millions, thousands with rounding
body: <p>I'm trying to format a price for display, and I want to display a number with the million (M) or thousands (K) suffix, but only ever display at most 3 values, rounded down. </p>
  
  <p>I found <a href="https://stackoverflow.com/questions/11731996/string-format-numbers-thousands-123k-millions-123m-billions-123b">this question</a> which is very close to what I want, but doesn't handle rounding (specifically, always rounding down)</p>
  
  <p>Likewise, <a href="https://stackoverflow.com/questions/2134161/format-number-like-stack-overflow-rounded-to-thousands-with-k-suffix">with this question</a> you have no control over the rounding.</p>
  
  <p>Sample input/expected output:</p>
  
  <pre><code>1 = 1
  10 = 10
  100 = 100
  1000 = 1K
  100000 = 100K
  125000 = 125K
  125900 = 125K
  1000000 = 1M
  1250000 = 1.25M
  1258000 = 1.25M
  10000000 = 10M
  10500000 = 10.5M
  100000000 = 100M
  100100000 = 100M
  </code></pre>
  
  <p>I essentially only ever want to display 3 values.</p>
  
  <p>I can't see how i can use the <a href="https://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.100).aspx#SpecifierTh" rel="noreferrer">"," custom specifier</a> and specify rounding.</p>
  
  <p>My initial thinking suggests I need to use a combination of the above, Math.Floor and some .ToString() formatting magic, but i'm not really sure where to start.</p>
  
  <p>Can someone help me out?</p>
  
  <p>Thanks in advance.</p>