Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String.prototype.turkishtoEnglish = function () {
- return this.replace('Ğ','g')
- .replace('Ü','u')
- .replace('Ş','s')
- .replace('I','i')
- .replace('İ','i')
- .replace('Ö','o')
- .replace('Ç','c')
- .replace('ğ','g')
- .replace('ü','u')
- .replace('ş','s')
- .replace('ı','i')
- .replace('ö','o')
- .replace('ç','c');
- };
- // Example
- // let text = 'Ne güzel bir gökkuşağı';
- // newText = text.turkishtoEnglish();
- // console.log(newText) /Ne guzel bir gokkusagi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement