Help for this page

Select Code to Download


  1. or download this
    c = c.charCodeAt(0);
    c++;
    ...
    temp = c;
    c = String.fromCharCode(temp);
    line += c;
    
  2. or download this
    line += String.fromCharCode(c.charCodeAt(0)+1);
    
  3. or download this
    $line .= chr(ord($c)+1);
    
  4. or download this
    use strict;
    use warnings;
    ...
    print "1. line='$line' c='$c'\n";
    $line .= chr(ord($c)+1);
    print "2. line='$line' c='$c'\n";
    
  5. or download this
    1. line='hello' c='A'
    2. line='helloB' c='A'