title: Kotlin-How can i put comma every three number like this 1,000,000,000
body: <p>i have an issue and will be appreciated if u help me .</p>
  <p>this is an example of my issue :</p>
  <p>I have some variables like (10.000 , 20,000) that user can select them and increase there credit .</p>
  <p>when user click and chose one of them it goes to bank gateway and after payment it goes back to my app .</p>
  <p>I used a text view to get the amount . it's no problem with this .</p>
  <p>the amount that stored and show to user is 10000 or 20000 or 100000 and i want to be like this 10,000 or 20,000 or 100,000</p>
  <p>actually every three number put a comma .</p>
  <p>code :</p>
  <pre><code>  private fun makepayment(amount: Long) {
  
  
          val progress = findViewById&lt;RelativeLayout&gt;(R.id.rl_progress)
  
          val purchase = ZarinPal.getPurchase(this)
  
          val payment: PaymentRequest = ZarinPal.getSandboxPaymentRequest()
          payment.merchantID = getString(R.string.MerchantId)
          payment.amount = amount
          payment.isZarinGateEnable(true)
          payment.description = getString(R.string.incresemoney)
          payment.setCallbackURL(&quot;returnfromzarinpal://mivebaranapp&quot;)
  
  
  
          purchase.startPayment(payment) {
  
  
                  status, authority, paymentGatewayUri, intent -&gt;
  
              if (status == 100) {
  
                  progress.visibility = View.GONE
                  startActivity(intent)
  
              } else {
  
                  Toast.makeText(
                      this,
                      &quot;خطایی در برقراری ارتباط با درگاه رخ داده ، لطفا دوباره امتحان کنید&quot;,
                      Toast.LENGTH_LONG
                  ).show()
  
  
              }
  
          }
  
      }
  
  </code></pre>
  <pre><code>private fun paymentVerification() {
  
      val textmoney: TextView = findViewById(R.id.money)
      val data: Uri? = intent.data
  
      val getpurchase = ZarinPal.getPurchase(this)
  
  
      getpurchase.verificationPayment(data) {
  
              isPaymentSuccess, refID, paymentRequest -&gt;
  
          if (isPaymentSuccess) {
  
  
              textmoney.text = &quot;${paymentRequest.amount} تومان  &quot;
  
  
              Toast.makeText(this, &quot;افزایش موجودی شما با موفقیت انجام شد &quot;, Toast.LENGTH_LONG)
                  .show()
  
          } else {
  
              Toast.makeText(
                  this,
                  &quot;در عملیات پرداخت خطایی رخ داده ، لطفا دوباره سعی کنید&quot;,
                  Toast.LENGTH_LONG
              ).show()
  
  
          }
  
  
      }
  </code></pre>
  <pre><code></code></pre>