Skip to content

Instantly share code, notes, and snippets.

View mit4dev's full-sized avatar

Mustafa Irfan TARI mit4dev

  • Turkey
  • 06:31 (UTC +03:00)
View GitHub Profile
@mit4dev
mit4dev / Gmail Group By Sender
Created December 27, 2022 11:14 — forked from paulirish/Code.gs
finding most common senders in gmail - apps script
// this is pretty quick and rough.. but it works
// script.google.com
// settings to allow editing the appscript.json
// set these two files
// then hit Run with function 'run'
const all = {};
function run() {
@mit4dev
mit4dev / ready-tr-lower-upper-func.js
Created February 14, 2020 08:21 — forked from barlas/ready-tr-lower-upper-func.js
javascript - Turkish character lowercase and uppercase functions.
String.prototype.turkishToLower = function(){
var string = this;
var letters = { "İ": "i", "I": "ı", "Ş": "ş", "Ğ": "ğ", "Ü": "ü", "Ö": "ö", "Ç": "ç" };
string = string.replace(/(([İIŞĞÜÇÖ]))/g, function(letter){ return letters[letter]; })
return string.toLowerCase();
}
String.prototype.turkishToUpper = function(){
var string = this;
var letters = { "i": "İ", "ş": "Ş", "ğ": "Ğ", "ü": "Ü", "ö": "Ö", "ç": "Ç", "ı": "I" };