Javascript chr : Strings : PHP functions in JavaScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » PHP functions in JavaScript » Strings »

 

Javascript chr


Converts a codepoint number to a character
Example 1

Running
1.chr(75);

Could return
1.'K'
function chr( ascii ) {
    // Converts a codepoint number to a character  
    // 
    // version: 810.114
    // discuss at: http://phpjs.org/functions/chr
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // *     example 1: chr(75);
    // *     returns 1: 'K'
    return String.fromCharCode(ascii);
}


HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo PHP functions in JavaScript
» Strings