About 2,100,000 results
Open links in new tab
  1. Convert character to ASCII code in JavaScript - Stack Overflow

    Sep 18, 2008 · String.prototype.charCodeAt() can convert string characters to ASCII numbers. For example: "ABC".charCodeAt(0) // returns 65 For opposite use String.fromCharCode(10) …

  2. javascript - charAt vs charCodeAt? - Stack Overflow

    Feb 26, 2018 · The charCodeAt() method returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index. The UTF-16 code unit matches the Unicode code …

  3. javascript - Difference between codePointAt and charCodeAt

    Apr 10, 2016 · From the MDN page on charCodeAt: The charCodeAt() method returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index. The UTF-16 code …

  4. javascript - Java equivalent for .charCodeAt() - Stack Overflow

    In JavaScript, .charCodeAt() returns a Unicode value at a certain point in the string which you pass to a function. If I only had one character, I could use the code below to get the Unicode …

  5. javascript - How to reverse String.fromCharCode? - Stack Overflow

    Jan 15, 2010 · If you have to consider encoding, note that the charCodeAt method from String object will default to the utf16 encoding. You can use the string_decoder object and the …

  6. What is the charCodeAt () equivalent in C#? - Stack Overflow

    Feb 27, 2018 · What is the charCodeAt() equivalent in C#? Current Code: string outString=""; for (var i = 0; i < inpString.Length; i++) { outString += inpString.charCodeAt(i ...

  7. javascript - charCodeAt and fromCharCode do not return the same ...

    Mar 12, 2014 · String.fromCharCode("a".charCodeAt(0)); //"a" This makes sense because I'm just trying to get the char code of a character, and then casting it back to a character. However …

  8. UTF-8 safe equivalent of javascript's charCodeAt () in PHP

    Jan 24, 2024 · I need to be able to use ord() to get the same value as javascript's charCodeAt() function. The problem is that ord() doesn't support UTF8. How can I get Ą to translate to 260 in …

  9. javascript - String.charCodeAt undefined? - Stack Overflow

    Oct 9, 2009 · TypeError: Result of expression 'String.charCodeAt' [undefined] is not a function. When I try to do stringInstance.charCodeAt('9') instead, I get NaN. Am I doing something …

  10. What does charCodeAt (...) & 0xff accomplish? - Stack Overflow

    Dec 23, 2013 · charCodeAt will return a value in the range of 0..65536. This code truncates that range to 0..255. This code truncates that range to 0..255. Effectively, it's taking each 16-bit …

Refresh