Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. String.prototype.turkishtoEnglish = function () {
  2. return this.replace('Ğ','g')
  3. .replace('Ü','u')
  4. .replace('Ş','s')
  5. .replace('I','i')
  6. .replace('İ','i')
  7. .replace('Ö','o')
  8. .replace('Ç','c')
  9. .replace('ğ','g')
  10. .replace('ü','u')
  11. .replace('ş','s')
  12. .replace('ı','i')
  13. .replace('ö','o')
  14. .replace('ç','c');
  15. };
  16.  
  17. // Example
  18. // let text = 'Ne güzel bir gökkuşağı';
  19. // newText = text.turkishtoEnglish();
  20. // console.log(newText) /Ne guzel bir gokkusagi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement