Guest User

Untitled

a guest
Feb 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. "html_instructions" : "Turn u003cbu003eleftu003c/bu003e onto u003cbu003eEnggårdsgadeu003c/bu003e"
  2.  
  3. 'u003cbu003eleftu003c/bu003e' == '<b>left</b>'; // true
  4.  
  5. JSON.parse(JSON.stringify({a : 'Turn u003cbu003eleftu003c/bu003e onto u003cbu003eEnggårdsgadeu003c/bu003e'}));
  6.  
  7. var directions = "Turn u003cbu003eleftu003c/bu003e onto u003cbu003eEnggårdsgadeu003c/bu003e";
  8.  
  9. directions.normalize();
  10.  
  11. //it will return : "Turn <b>left</b> onto <b>Enggårdsgade</b>"
  12.  
  13. String.prototype.toUnicode = function(){
  14. var hex, i;
  15. var result = "";
  16. for (i=0; i<this.length; i++) {
  17. hex = this.charCodeAt(i).toString(16);
  18. result += ("\u00"+hex).slice(-7);
  19. }
  20.  
  21. return result;
  22. };
Add Comment
Please, Sign In to add comment