Hi Taro,

Probably racket/format is what you need to look at.
http://docs.racket-lang.org/reference/strings.html#%28mod-path._racket%2Fformat%29

#lang racket/base
(require racket/format)
(define (this-format num)
  (~a #:min-width 3 #:align 'right #:pad-string "0"
      num))
(this-format 5) ;=> "005"

Regards,
Deren


On Mon, Oct 12, 2015 at 12:16 PM, Taro Annual <sagyo12341...@gmail.com>
wrote:

> Hi,
>
> Please tell me the way of the following in racket?
>
> In C,
> printf("%02d", 2);
>
> In Common Lisp,
> (format t "~2,'0D" 2)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to