Convert PHP code into Ruby!
RSS icon Email icon Home icon
  • chr

    Posted on June 10th, 2009 RubyLove No comments

    The chr function returns a one-character string, which represents the character specified by an ASCII code.

    PHP

    echo chr(115);
    => // s

    Ruby

    puts 115.chr
    => # s

    Leave a reply