Answers for "string to char javascript"

12

javascript get first character of string

var str="Hello Folks!"
var firstStringChar = str.charAt(0); //H
Posted by: Guest on August-01-2019
1

string to charcode js

'ABC'.charCodeAt(0)  // returns 65
Posted by: Guest on June-09-2021
0

javascript unicode to string

//convert unicode to string

// using a variable
let unicodeString = "http\\u00253A\\u00252F\\u00252Fexample.com\u{1F4A9}\x61";
console.log(decodeURIComponent(JSON.parse('"' + unicodeString.replace(/\"/g, '\\"') + '"')));

// direct approach
console.log(decodeURIComponent(JSON.parse('"http\\u00253A\\u00252F\\u00252Fexample.com\u{1F4A9}\x61"')));
Posted by: Guest on June-10-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language